Browse Source

Move more strings to PROGMEM

Scott Lahteine 6 years ago
parent
commit
2bea1bda56

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/include/Wire.h View File

@@ -49,7 +49,7 @@ class TwoWire {
49 49
 
50 50
     uint8_t requestFrom(uint8_t, uint8_t);
51 51
     uint8_t requestFrom(int, int);
52
-    
52
+
53 53
     virtual size_t write(uint8_t);
54 54
     virtual size_t write(const uint8_t *, size_t);
55 55
     virtual int available(void);

+ 4
- 4
Marlin/src/HAL/HAL_LPC1768/persistent_store_impl.cpp View File

@@ -107,7 +107,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
107 107
    SERIAL_PROTOCOLPAIR(" write_data(", pos);         // This extra chit-chat goes away soon.  But it is helpful
108 108
    SERIAL_PROTOCOLPAIR(",", (int)value);            // right now to see errors that are happening in the
109 109
    SERIAL_PROTOCOLPAIR(",", (int)size);             // read_data() and write_data() functions
110
-   SERIAL_PROTOCOL("...)\n");
110
+   SERIAL_PROTOCOLLNPGM("...)");
111 111
    SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s);
112 112
    return s;
113 113
   }
@@ -117,7 +117,7 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
117 117
    SERIAL_PROTOCOLPAIR(" write_data(", pos);         // This extra chit-chat goes away soon.  But it is helpful
118 118
    SERIAL_PROTOCOLPAIR(",", (int)value);            // right now to see errors that are happening in the
119 119
    SERIAL_PROTOCOLPAIR(",", size);             // read_data() and write_data() functions
120
-   SERIAL_PROTOCOLLN("...)");
120
+   SERIAL_PROTOCOLLNPGM("...)");
121 121
    SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
122 122
    SERIAL_PROTOCOLPAIR(" size=", size);
123 123
    SERIAL_PROTOCOLLNPAIR("\n bytes_written=", bytes_written);
@@ -136,7 +136,7 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
136 136
    SERIAL_PROTOCOLPAIR(" read_data(", pos);          // This extra chit-chat goes away soon.  But it is helpful
137 137
    SERIAL_PROTOCOLPAIR(",", (int)value);            // right now to see errors that are happening in the
138 138
    SERIAL_PROTOCOLPAIR(",", size);             // read_data() and write_data() functions
139
-   SERIAL_PROTOCOLLN("...)");
139
+   SERIAL_PROTOCOLLNPGM("...)");
140 140
    SERIAL_PROTOCOLLNPAIR(" f_lseek()=", (int)s);
141 141
    return true;
142 142
   }
@@ -153,7 +153,7 @@ bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const boo
153 153
    SERIAL_PROTOCOLPAIR(" read_data(", pos);         // This extra chit-chat goes away soon.  But it is helpful
154 154
    SERIAL_PROTOCOLPAIR(",", (int)value);           // right now to see errors that are happening in the
155 155
    SERIAL_PROTOCOLPAIR(",", size);            // read_data() and write_data() functions
156
-   SERIAL_PROTOCOLLN("...)");
156
+   SERIAL_PROTOCOLLNPGM("...)");
157 157
    SERIAL_PROTOCOLLNPAIR(" f_write()=", (int)s);
158 158
    SERIAL_PROTOCOLPAIR(" size=", size);
159 159
    SERIAL_PROTOCOLLNPAIR("\n bytes_read=",  bytes_read);

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp View File

@@ -1095,7 +1095,7 @@
1095 1095
     SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt);
1096 1096
 
1097 1097
     #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1098
-      SERIAL_PROTOCOL("planner.z_fade_height : ");
1098
+      SERIAL_PROTOCOLPGM("planner.z_fade_height : ");
1099 1099
       SERIAL_PROTOCOL_F(planner.z_fade_height, 4);
1100 1100
       SERIAL_EOL();
1101 1101
     #endif

+ 1
- 1
Marlin/src/feature/dac/stepper_dac.cpp View File

@@ -114,7 +114,7 @@ void dac_print_values() {
114 114
   SERIAL_ECHOPAIR(" (",   dac_amps(Z_AXIS));
115 115
   SERIAL_ECHOPAIR(") E:", dac_perc(E_AXIS));
116 116
   SERIAL_ECHOPAIR(" (",   dac_amps(E_AXIS));
117
-  SERIAL_ECHOLN(")");
117
+  SERIAL_ECHOLNPGM(")");
118 118
 }
119 119
 
120 120
 void dac_commit_eeprom() {

+ 1
- 1
Marlin/src/gcode/config/M301.cpp View File

@@ -71,7 +71,7 @@ void GcodeSuite::M301() {
71 71
   }
72 72
   else {
73 73
     SERIAL_ERROR_START();
74
-    SERIAL_ERRORLN(MSG_INVALID_EXTRUDER);
74
+    SERIAL_ERRORLNPGM(MSG_INVALID_EXTRUDER);
75 75
   }
76 76
 }
77 77
 

+ 2
- 2
Marlin/src/gcode/feature/caselight/M355.cpp View File

@@ -56,10 +56,10 @@ void GcodeSuite::M355() {
56 56
     // always report case light status
57 57
     SERIAL_ECHO_START();
58 58
     if (!case_light_on) {
59
-      SERIAL_ECHOLN("Case light: off");
59
+      SERIAL_ECHOLNPGM("Case light: off");
60 60
     }
61 61
     else {
62
-      if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLN("Case light: on");
62
+      if (!USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) SERIAL_ECHOLNPGM("Case light: on");
63 63
       else SERIAL_ECHOLNPAIR("Case light: ", case_light_brightness);
64 64
     }
65 65
   #else

+ 1
- 1
Marlin/src/gcode/feature/i2c/M260_M261.cpp View File

@@ -73,7 +73,7 @@ void GcodeSuite::M261() {
73 73
   }
74 74
   else {
75 75
     SERIAL_ERROR_START();
76
-    SERIAL_ERRORLN("Bad i2c request");
76
+    SERIAL_ERRORLNPGM("Bad i2c request");
77 77
   }
78 78
 }
79 79
 

+ 2
- 2
Marlin/src/module/configuration_store.cpp View File

@@ -1502,7 +1502,7 @@ void MarlinSettings::postprocess() {
1502 1502
         HAL::PersistentStore::access_finish();
1503 1503
 
1504 1504
         if (status)
1505
-          SERIAL_PROTOCOL("?Unable to save mesh data.\n");
1505
+          SERIAL_PROTOCOLPGM("?Unable to save mesh data.\n");
1506 1506
 
1507 1507
         // Write crc to MAT along with other data, or just tack on to the beginning or end
1508 1508
 
@@ -1540,7 +1540,7 @@ void MarlinSettings::postprocess() {
1540 1540
         HAL::PersistentStore::access_finish();
1541 1541
 
1542 1542
         if (status)
1543
-          SERIAL_PROTOCOL("?Unable to load mesh data.\n");
1543
+          SERIAL_PROTOCOLPGM("?Unable to load mesh data.\n");
1544 1544
 
1545 1545
         #if ENABLED(EEPROM_CHITCHAT)
1546 1546
           else

+ 2
- 2
Marlin/src/module/temperature.cpp View File

@@ -266,11 +266,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS],
266 266
     #endif
267 267
 
268 268
     if (!WITHIN(hotend, _BOT_HOTEND, _TOP_HOTEND)) {
269
-      SERIAL_ECHOLN(MSG_PID_BAD_EXTRUDER_NUM);
269
+      SERIAL_ECHOLNPGM(MSG_PID_BAD_EXTRUDER_NUM);
270 270
       return;
271 271
     }
272 272
 
273
-    SERIAL_ECHOLN(MSG_PID_AUTOTUNE_START);
273
+    SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START);
274 274
 
275 275
     disable_all_heaters(); // switch off all heaters.
276 276
 

+ 1
- 1
Marlin/src/module/tool_change.cpp View File

@@ -123,7 +123,7 @@ inline void invalid_extruder_error(const uint8_t e) {
123 123
   SERIAL_CHAR('T');
124 124
   SERIAL_ECHO_F(e, DEC);
125 125
   SERIAL_CHAR(' ');
126
-  SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
126
+  SERIAL_ECHOLNPGM(MSG_INVALID_EXTRUDER);
127 127
 }
128 128
 
129 129
 /**

+ 1
- 1
Marlin/src/sd/cardreader.cpp View File

@@ -364,7 +364,7 @@ void CardReader::openFile(char* name, const bool read, const bool subcall/*=fals
364 364
       if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
365 365
         SERIAL_ERROR_START();
366 366
         SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
367
-        SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
367
+        SERIAL_ERRORLN((int)SD_PROCEDURE_DEPTH);
368 368
         kill(PSTR(MSG_KILLED));
369 369
         return;
370 370
       }

Loading…
Cancel
Save