Browse Source

Optimize some serial strings

Scott Lahteine 6 years ago
parent
commit
1dcfe193ac

+ 1
- 1
Marlin/src/feature/I2CPositionEncoder.cpp View File

116
 
116
 
117
           SERIAL_ECHOPGM("New position reads as ");
117
           SERIAL_ECHOPGM("New position reads as ");
118
           SERIAL_ECHO(get_position());
118
           SERIAL_ECHO(get_position());
119
-          SERIAL_ECHOPGM("(");
119
+          SERIAL_CHAR('(');
120
           SERIAL_ECHO(mm_from_count(get_position()));
120
           SERIAL_ECHO(mm_from_count(get_position()));
121
           SERIAL_ECHOLNPGM(")");
121
           SERIAL_ECHOLNPGM(")");
122
         #endif
122
         #endif

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

1732
           d = t + normal.z * z1;
1732
           d = t + normal.z * z1;
1733
           SERIAL_ECHOPGM("D from 1st point: ");
1733
           SERIAL_ECHOPGM("D from 1st point: ");
1734
           SERIAL_ECHO_F(d, 6);
1734
           SERIAL_ECHO_F(d, 6);
1735
-          SERIAL_ECHO("   Z error: ");
1735
+          SERIAL_ECHOPGM("   Z error: ");
1736
           SERIAL_ECHO_F(normal.z*z1-get_z_correction(UBL_PROBE_PT_1_X, UBL_PROBE_PT_1_Y),6);
1736
           SERIAL_ECHO_F(normal.z*z1-get_z_correction(UBL_PROBE_PT_1_X, UBL_PROBE_PT_1_Y),6);
1737
           SERIAL_EOL();
1737
           SERIAL_EOL();
1738
 
1738
 
1741
           SERIAL_EOL();
1741
           SERIAL_EOL();
1742
           SERIAL_ECHOPGM("D from 2nd point: ");
1742
           SERIAL_ECHOPGM("D from 2nd point: ");
1743
           SERIAL_ECHO_F(d, 6);
1743
           SERIAL_ECHO_F(d, 6);
1744
-          SERIAL_ECHO("   Z error: ");
1744
+          SERIAL_ECHOPGM("   Z error: ");
1745
           SERIAL_ECHO_F(normal.z*z2-get_z_correction(UBL_PROBE_PT_2_X, UBL_PROBE_PT_2_Y),6);
1745
           SERIAL_ECHO_F(normal.z*z2-get_z_correction(UBL_PROBE_PT_2_X, UBL_PROBE_PT_2_Y),6);
1746
           SERIAL_EOL();
1746
           SERIAL_EOL();
1747
 
1747
 
1749
           d = t + normal.z * z3;
1749
           d = t + normal.z * z3;
1750
           SERIAL_ECHOPGM("D from 3rd point: ");
1750
           SERIAL_ECHOPGM("D from 3rd point: ");
1751
           SERIAL_ECHO_F(d, 6);
1751
           SERIAL_ECHO_F(d, 6);
1752
-          SERIAL_ECHO("   Z error: ");
1752
+          SERIAL_ECHOPGM("   Z error: ");
1753
           SERIAL_ECHO_F(normal.z*z3-get_z_correction(UBL_PROBE_PT_3_X, UBL_PROBE_PT_3_Y),6);
1753
           SERIAL_ECHO_F(normal.z*z3-get_z_correction(UBL_PROBE_PT_3_X, UBL_PROBE_PT_3_Y),6);
1754
           SERIAL_EOL();
1754
           SERIAL_EOL();
1755
 
1755
 
1766
 
1766
 
1767
           SERIAL_ECHOPAIR("   Z error: (", Z_SAFE_HOMING_X_POINT );
1767
           SERIAL_ECHOPAIR("   Z error: (", Z_SAFE_HOMING_X_POINT );
1768
           SERIAL_ECHOPAIR(",", Z_SAFE_HOMING_Y_POINT );
1768
           SERIAL_ECHOPAIR(",", Z_SAFE_HOMING_Y_POINT );
1769
-          SERIAL_ECHO(") = ");
1769
+          SERIAL_ECHOPGM(") = ");
1770
           SERIAL_ECHO_F( get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT),6);
1770
           SERIAL_ECHO_F( get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT),6);
1771
           SERIAL_EOL();
1771
           SERIAL_EOL();
1772
 */
1772
 */

+ 1
- 1
Marlin/src/gcode/calibrate/M852.cpp View File

93
 
93
 
94
   if (!ijk) {
94
   if (!ijk) {
95
     SERIAL_ECHO_START();
95
     SERIAL_ECHO_START();
96
-    SERIAL_ECHO(MSG_SKEW_FACTOR " XY: ");
96
+    SERIAL_ECHOPGM(MSG_SKEW_FACTOR " XY: ");
97
     SERIAL_ECHO_F(planner.xy_skew_factor, 6);
97
     SERIAL_ECHO_F(planner.xy_skew_factor, 6);
98
     SERIAL_EOL();
98
     SERIAL_EOL();
99
     #if ENABLED(SKEW_CORRECTION_FOR_Z)
99
     #if ENABLED(SKEW_CORRECTION_FOR_Z)

+ 2
- 2
Marlin/src/gcode/parser.cpp View File

286
     SERIAL_ECHO(codenum);
286
     SERIAL_ECHO(codenum);
287
     SERIAL_ECHOLNPGM(")");
287
     SERIAL_ECHOLNPGM(")");
288
     #if ENABLED(FASTER_GCODE_PARSER)
288
     #if ENABLED(FASTER_GCODE_PARSER)
289
-      SERIAL_ECHO(" args: \"");
289
+      SERIAL_ECHOPGM(" args: \"");
290
       for (char c = 'A'; c <= 'Z'; ++c)
290
       for (char c = 'A'; c <= 'Z'; ++c)
291
         if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
291
         if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
292
     #else
292
     #else
293
       SERIAL_ECHOPAIR(" args: \"", command_args);
293
       SERIAL_ECHOPAIR(" args: \"", command_args);
294
     #endif
294
     #endif
295
-    SERIAL_ECHOPGM("\"");
295
+    SERIAL_CHAR('"');
296
     if (string_arg) {
296
     if (string_arg) {
297
       SERIAL_ECHOPGM(" string: \"");
297
       SERIAL_ECHOPGM(" string: \"");
298
       SERIAL_ECHO(string_arg);
298
       SERIAL_ECHO(string_arg);

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

2266
       }
2266
       }
2267
       CONFIG_ECHO_START;
2267
       CONFIG_ECHO_START;
2268
       #if ENABLED(SKEW_CORRECTION_FOR_Z)
2268
       #if ENABLED(SKEW_CORRECTION_FOR_Z)
2269
-        SERIAL_ECHO_P(port, "  M852 I");
2269
+        SERIAL_ECHOPGM_P(port, "  M852 I");
2270
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
2270
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
2271
         SERIAL_ECHOPGM_P(port, " J");
2271
         SERIAL_ECHOPGM_P(port, " J");
2272
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xz_skew_factor), 6);
2272
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xz_skew_factor), 6);
2274
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.yz_skew_factor), 6);
2274
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.yz_skew_factor), 6);
2275
         SERIAL_EOL_P(port);
2275
         SERIAL_EOL_P(port);
2276
        #else
2276
        #else
2277
-        SERIAL_ECHO_P(port, "  M852 S");
2277
+        SERIAL_ECHOPGM_P(port, "  M852 S");
2278
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
2278
         SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
2279
         SERIAL_EOL_P(port);
2279
         SERIAL_EOL_P(port);
2280
       #endif
2280
       #endif
2289
         SERIAL_ECHOLNPGM_P(port, "Stepper driver current:");
2289
         SERIAL_ECHOLNPGM_P(port, "Stepper driver current:");
2290
       }
2290
       }
2291
       CONFIG_ECHO_START;
2291
       CONFIG_ECHO_START;
2292
-      SERIAL_ECHO_P(port, "  M906");
2292
+      SERIAL_ECHOPGM_P(port, "  M906");
2293
       #if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
2293
       #if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
2294
         SERIAL_ECHOPAIR_P(port, " X ", stepperX.getCurrent());
2294
         SERIAL_ECHOPAIR_P(port, " X ", stepperX.getCurrent());
2295
       #endif
2295
       #endif
2335
         SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:");
2335
         SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:");
2336
       }
2336
       }
2337
       CONFIG_ECHO_START;
2337
       CONFIG_ECHO_START;
2338
-      SERIAL_ECHO_P(port, "  M914");
2338
+      SERIAL_ECHOPGM_P(port, "  M914");
2339
       #if ENABLED(X_IS_TMC2130)
2339
       #if ENABLED(X_IS_TMC2130)
2340
         SERIAL_ECHOPAIR_P(port, " X", stepperX.sgt());
2340
         SERIAL_ECHOPAIR_P(port, " X", stepperX.sgt());
2341
       #endif
2341
       #endif

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

144
 
144
 
145
   SERIAL_ECHOPGM("Filament used: ");
145
   SERIAL_ECHOPGM("Filament used: ");
146
   SERIAL_ECHO(this->data.filamentUsed / 1000);
146
   SERIAL_ECHO(this->data.filamentUsed / 1000);
147
-  SERIAL_ECHOPGM("m");
147
+  SERIAL_CHAR('m');
148
 
148
 
149
   SERIAL_EOL();
149
   SERIAL_EOL();
150
 }
150
 }

Loading…
Cancel
Save