瀏覽代碼

🎨 Apply F() to G-code report header

Scott Lahteine 3 年之前
父節點
當前提交
d7fede3a63
共有 36 個文件被更改,包括 50 次插入50 次删除
  1. 1
    1
      Marlin/src/gcode/bedlevel/M420.cpp
  2. 1
    1
      Marlin/src/gcode/calibrate/G34_M422.cpp
  3. 1
    1
      Marlin/src/gcode/calibrate/M425.cpp
  4. 3
    3
      Marlin/src/gcode/calibrate/M665.cpp
  5. 2
    2
      Marlin/src/gcode/calibrate/M666.cpp
  6. 1
    1
      Marlin/src/gcode/calibrate/M852.cpp
  7. 5
    5
      Marlin/src/gcode/config/M200-M205.cpp
  8. 1
    1
      Marlin/src/gcode/config/M217.cpp
  9. 1
    1
      Marlin/src/gcode/config/M218.cpp
  10. 1
    1
      Marlin/src/gcode/config/M281.cpp
  11. 1
    1
      Marlin/src/gcode/config/M301.cpp
  12. 1
    1
      Marlin/src/gcode/config/M304.cpp
  13. 1
    1
      Marlin/src/gcode/config/M309.cpp
  14. 1
    1
      Marlin/src/gcode/config/M92.cpp
  15. 1
    1
      Marlin/src/gcode/control/M211.cpp
  16. 1
    1
      Marlin/src/gcode/feature/advance/M900.cpp
  17. 1
    1
      Marlin/src/gcode/feature/controllerfan/M710.cpp
  18. 1
    1
      Marlin/src/gcode/feature/digipot/M907-M910.cpp
  19. 3
    3
      Marlin/src/gcode/feature/fwretract/M207-M209.cpp
  20. 1
    1
      Marlin/src/gcode/feature/pause/M603.cpp
  21. 1
    1
      Marlin/src/gcode/feature/powerloss/M413.cpp
  22. 1
    1
      Marlin/src/gcode/feature/runout/M412.cpp
  23. 1
    1
      Marlin/src/gcode/feature/trinamic/M569.cpp
  24. 1
    1
      Marlin/src/gcode/feature/trinamic/M906.cpp
  25. 2
    2
      Marlin/src/gcode/feature/trinamic/M911-M914.cpp
  26. 3
    3
      Marlin/src/gcode/gcode.cpp
  27. 3
    3
      Marlin/src/gcode/gcode.h
  28. 1
    1
      Marlin/src/gcode/geometry/M206_M428.cpp
  29. 1
    1
      Marlin/src/gcode/lcd/M145.cpp
  30. 1
    1
      Marlin/src/gcode/lcd/M250.cpp
  31. 1
    1
      Marlin/src/gcode/lcd/M256.cpp
  32. 1
    1
      Marlin/src/gcode/lcd/M414.cpp
  33. 1
    1
      Marlin/src/gcode/probe/M851.cpp
  34. 1
    1
      Marlin/src/gcode/units/M149.cpp
  35. 1
    1
      Marlin/src/module/settings.cpp
  36. 1
    1
      Marlin/src/module/temperature.cpp

+ 1
- 1
Marlin/src/gcode/bedlevel/M420.cpp 查看文件

243
 }
243
 }
244
 
244
 
245
 void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
245
 void GcodeSuite::M420_report(const bool forReplay/*=true*/) {
246
-  report_heading_etc(forReplay, PSTR(
246
+  report_heading_etc(forReplay, F(
247
     TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
247
     TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling"))
248
   ));
248
   ));
249
   SERIAL_ECHOF(
249
   SERIAL_ECHOF(

+ 1
- 1
Marlin/src/gcode/calibrate/G34_M422.cpp 查看文件

538
 }
538
 }
539
 
539
 
540
 void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
540
 void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
541
-  report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN));
541
+  report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
542
   LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
542
   LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
543
     report_echo_start(forReplay);
543
     report_echo_start(forReplay);
544
     SERIAL_ECHOLNPGM_P(
544
     SERIAL_ECHOLNPGM_P(

+ 1
- 1
Marlin/src/gcode/calibrate/M425.cpp 查看文件

114
 }
114
 }
115
 
115
 
116
 void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
116
 void GcodeSuite::M425_report(const bool forReplay/*=true*/) {
117
-  report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION));
117
+  report_heading_etc(forReplay, F(STR_BACKLASH_COMPENSATION));
118
   SERIAL_ECHOLNPGM_P(
118
   SERIAL_ECHOLNPGM_P(
119
     PSTR("  M425 F"), backlash.get_correction()
119
     PSTR("  M425 F"), backlash.get_correction()
120
     #ifdef BACKLASH_SMOOTHING_MM
120
     #ifdef BACKLASH_SMOOTHING_MM

+ 3
- 3
Marlin/src/gcode/calibrate/M665.cpp 查看文件

62
   }
62
   }
63
 
63
 
64
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
64
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
65
-    report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS));
65
+    report_heading_etc(forReplay, F(STR_DELTA_SETTINGS));
66
     SERIAL_ECHOLNPGM_P(
66
     SERIAL_ECHOLNPGM_P(
67
         PSTR("  M665 L"), LINEAR_UNIT(delta_diagonal_rod)
67
         PSTR("  M665 L"), LINEAR_UNIT(delta_diagonal_rod)
68
       , PSTR(" R"), LINEAR_UNIT(delta_radius)
68
       , PSTR(" R"), LINEAR_UNIT(delta_radius)
132
   }
132
   }
133
 
133
 
134
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
134
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
135
-    report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
135
+    report_heading_etc(forReplay, F(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")"));
136
     SERIAL_ECHOLNPGM_P(
136
     SERIAL_ECHOLNPGM_P(
137
       PSTR("  M665 S"), segments_per_second
137
       PSTR("  M665 S"), segments_per_second
138
       #if HAS_SCARA_OFFSET
138
       #if HAS_SCARA_OFFSET
162
   }
162
   }
163
 
163
 
164
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
164
   void GcodeSuite::M665_report(const bool forReplay/*=true*/) {
165
-    report_heading_etc(forReplay, PSTR(STR_POLARGRAPH_SETTINGS " (" STR_S_SEG_PER_SEC ")"));
165
+    report_heading_etc(forReplay, F(STR_POLARGRAPH_SETTINGS " (" STR_S_SEG_PER_SEC ")"));
166
     SERIAL_ECHOLNPGM("  M665 S", segments_per_second);
166
     SERIAL_ECHOLNPGM("  M665 S", segments_per_second);
167
   }
167
   }
168
 
168
 

+ 2
- 2
Marlin/src/gcode/calibrate/M666.cpp 查看文件

61
   }
61
   }
62
 
62
 
63
   void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
63
   void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
64
-    report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
64
+    report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
65
     SERIAL_ECHOLNPGM_P(
65
     SERIAL_ECHOLNPGM_P(
66
         PSTR("  M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
66
         PSTR("  M666 X"), LINEAR_UNIT(delta_endstop_adj.a)
67
       , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
67
       , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b)
105
   }
105
   }
106
 
106
 
107
   void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
107
   void GcodeSuite::M666_report(const bool forReplay/*=true*/) {
108
-    report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT));
108
+    report_heading_etc(forReplay, F(STR_ENDSTOP_ADJUSTMENT));
109
     SERIAL_ECHOPGM("  M666");
109
     SERIAL_ECHOPGM("  M666");
110
     #if ENABLED(X_DUAL_ENDSTOPS)
110
     #if ENABLED(X_DUAL_ENDSTOPS)
111
       SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));
111
       SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj));

+ 1
- 1
Marlin/src/gcode/calibrate/M852.cpp 查看文件

92
 }
92
 }
93
 
93
 
94
 void GcodeSuite::M852_report(const bool forReplay/*=true*/) {
94
 void GcodeSuite::M852_report(const bool forReplay/*=true*/) {
95
-  report_heading_etc(forReplay, PSTR(STR_SKEW_FACTOR));
95
+  report_heading_etc(forReplay, F(STR_SKEW_FACTOR));
96
   SERIAL_ECHOPAIR_F("  M851 I", planner.skew_factor.xy, 6);
96
   SERIAL_ECHOPAIR_F("  M851 I", planner.skew_factor.xy, 6);
97
   #if ENABLED(SKEW_CORRECTION_FOR_Z)
97
   #if ENABLED(SKEW_CORRECTION_FOR_Z)
98
     SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6);
98
     SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6);

+ 5
- 5
Marlin/src/gcode/config/M200-M205.cpp 查看文件

76
 
76
 
77
   void GcodeSuite::M200_report(const bool forReplay/*=true*/) {
77
   void GcodeSuite::M200_report(const bool forReplay/*=true*/) {
78
     if (!forReplay) {
78
     if (!forReplay) {
79
-      report_heading(forReplay, PSTR(STR_FILAMENT_SETTINGS), false);
79
+      report_heading(forReplay, F(STR_FILAMENT_SETTINGS), false);
80
       if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):");
80
       if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):");
81
       SERIAL_EOL();
81
       SERIAL_EOL();
82
       report_echo_start(forReplay);
82
       report_echo_start(forReplay);
133
 }
133
 }
134
 
134
 
135
 void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
135
 void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
136
-  report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION));
136
+  report_heading_etc(forReplay, F(STR_MAX_ACCELERATION));
137
   SERIAL_ECHOLNPGM_P(
137
   SERIAL_ECHOLNPGM_P(
138
     LIST_N(DOUBLE(LINEAR_AXES),
138
     LIST_N(DOUBLE(LINEAR_AXES),
139
       PSTR("  M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
139
       PSTR("  M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
178
 }
178
 }
179
 
179
 
180
 void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
180
 void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
181
-  report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES));
181
+  report_heading_etc(forReplay, F(STR_MAX_FEEDRATES));
182
   SERIAL_ECHOLNPGM_P(
182
   SERIAL_ECHOLNPGM_P(
183
     LIST_N(DOUBLE(LINEAR_AXES),
183
     LIST_N(DOUBLE(LINEAR_AXES),
184
       PSTR("  M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
184
       PSTR("  M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
224
 }
224
 }
225
 
225
 
226
 void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
226
 void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
227
-  report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T));
227
+  report_heading_etc(forReplay, F(STR_ACCELERATION_P_R_T));
228
   SERIAL_ECHOLNPGM_P(
228
   SERIAL_ECHOLNPGM_P(
229
       PSTR("  M204 P"), LINEAR_UNIT(planner.settings.acceleration)
229
       PSTR("  M204 P"), LINEAR_UNIT(planner.settings.acceleration)
230
     , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration)
230
     , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration)
285
 }
285
 }
286
 
286
 
287
 void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
287
 void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
288
-  report_heading_etc(forReplay, PSTR(
288
+  report_heading_etc(forReplay, F(
289
     "Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
289
     "Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
290
     TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
290
     TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
291
     TERN_(HAS_CLASSIC_JERK, " X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk>")
291
     TERN_(HAS_CLASSIC_JERK, " X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk>")

+ 1
- 1
Marlin/src/gcode/config/M217.cpp 查看文件

131
 }
131
 }
132
 
132
 
133
 void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
133
 void GcodeSuite::M217_report(const bool forReplay/*=true*/) {
134
-  report_heading_etc(forReplay, PSTR(STR_TOOL_CHANGING));
134
+  report_heading_etc(forReplay, F(STR_TOOL_CHANGING));
135
 
135
 
136
   SERIAL_ECHOPGM("  M217");
136
   SERIAL_ECHOPGM("  M217");
137
 
137
 

+ 1
- 1
Marlin/src/gcode/config/M218.cpp 查看文件

57
 }
57
 }
58
 
58
 
59
 void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
59
 void GcodeSuite::M218_report(const bool forReplay/*=true*/) {
60
-  report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS));
60
+  report_heading_etc(forReplay, F(STR_HOTEND_OFFSETS));
61
   LOOP_S_L_N(e, 1, HOTENDS) {
61
   LOOP_S_L_N(e, 1, HOTENDS) {
62
     report_echo_start(forReplay);
62
     report_echo_start(forReplay);
63
     SERIAL_ECHOPGM_P(
63
     SERIAL_ECHOPGM_P(

+ 1
- 1
Marlin/src/gcode/config/M281.cpp 查看文件

55
 }
55
 }
56
 
56
 
57
 void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
57
 void GcodeSuite::M281_report(const bool forReplay/*=true*/) {
58
-  report_heading_etc(forReplay, PSTR(STR_SERVO_ANGLES));
58
+  report_heading_etc(forReplay, F(STR_SERVO_ANGLES));
59
   LOOP_L_N(i, NUM_SERVOS) {
59
   LOOP_L_N(i, NUM_SERVOS) {
60
     switch (i) {
60
     switch (i) {
61
       default: break;
61
       default: break;

+ 1
- 1
Marlin/src/gcode/config/M301.cpp 查看文件

79
 }
79
 }
80
 
80
 
81
 void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) {
81
 void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) {
82
-  report_heading(forReplay, PSTR(STR_HOTEND_PID));
82
+  report_heading(forReplay, F(STR_HOTEND_PID));
83
   IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1);
83
   IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1);
84
   HOTEND_LOOP() {
84
   HOTEND_LOOP() {
85
     if (e == eindex || eindex == -1) {
85
     if (e == eindex || eindex == -1) {

+ 1
- 1
Marlin/src/gcode/config/M304.cpp 查看文件

42
 }
42
 }
43
 
43
 
44
 void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
44
 void GcodeSuite::M304_report(const bool forReplay/*=true*/) {
45
-  report_heading_etc(forReplay, PSTR(STR_BED_PID));
45
+  report_heading_etc(forReplay, F(STR_BED_PID));
46
   SERIAL_ECHO_MSG(
46
   SERIAL_ECHO_MSG(
47
       "  M304 P", thermalManager.temp_bed.pid.Kp
47
       "  M304 P", thermalManager.temp_bed.pid.Kp
48
     , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)
48
     , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki)

+ 1
- 1
Marlin/src/gcode/config/M309.cpp 查看文件

42
 }
42
 }
43
 
43
 
44
 void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
44
 void GcodeSuite::M309_report(const bool forReplay/*=true*/) {
45
-  report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID));
45
+  report_heading_etc(forReplay, F(STR_CHAMBER_PID));
46
   SERIAL_ECHOLNPGM(
46
   SERIAL_ECHOLNPGM(
47
       "  M309 P", thermalManager.temp_chamber.pid.Kp
47
       "  M309 P", thermalManager.temp_chamber.pid.Kp
48
     , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki)
48
     , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki)

+ 1
- 1
Marlin/src/gcode/config/M92.cpp 查看文件

91
 }
91
 }
92
 
92
 
93
 void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
93
 void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) {
94
-  report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT));
94
+  report_heading_etc(forReplay, F(STR_STEPS_PER_UNIT));
95
   SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES),
95
   SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES),
96
     PSTR("  M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
96
     PSTR("  M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
97
     SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
97
     SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),

+ 1
- 1
Marlin/src/gcode/control/M211.cpp 查看文件

40
 }
40
 }
41
 
41
 
42
 void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
42
 void GcodeSuite::M211_report(const bool forReplay/*=true*/) {
43
-  report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS));
43
+  report_heading_etc(forReplay, F(STR_SOFT_ENDSTOPS));
44
   SERIAL_ECHOPGM("  M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
44
   SERIAL_ECHOPGM("  M211 S", AS_DIGIT(soft_endstop._enabled), " ; ");
45
   serialprintln_onoff(soft_endstop._enabled);
45
   serialprintln_onoff(soft_endstop._enabled);
46
 
46
 

+ 1
- 1
Marlin/src/gcode/feature/advance/M900.cpp 查看文件

145
 }
145
 }
146
 
146
 
147
 void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
147
 void GcodeSuite::M900_report(const bool forReplay/*=true*/) {
148
-  report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE));
148
+  report_heading(forReplay, F(STR_LINEAR_ADVANCE));
149
   #if EXTRUDERS < 2
149
   #if EXTRUDERS < 2
150
     report_echo_start(forReplay);
150
     report_echo_start(forReplay);
151
     SERIAL_ECHOLNPGM("  M900 K", planner.extruder_advance_K[0]);
151
     SERIAL_ECHOLNPGM("  M900 K", planner.extruder_advance_K[0]);

+ 1
- 1
Marlin/src/gcode/feature/controllerfan/M710.cpp 查看文件

67
 }
67
 }
68
 
68
 
69
 void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
69
 void GcodeSuite::M710_report(const bool forReplay/*=true*/) {
70
-  report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN));
70
+  report_heading_etc(forReplay, F(STR_CONTROLLER_FAN));
71
   SERIAL_ECHOLNPGM("  M710"
71
   SERIAL_ECHOLNPGM("  M710"
72
     " S", int(controllerFan.settings.active_speed),
72
     " S", int(controllerFan.settings.active_speed),
73
     " I", int(controllerFan.settings.idle_speed),
73
     " I", int(controllerFan.settings.idle_speed),

+ 1
- 1
Marlin/src/gcode/feature/digipot/M907-M910.cpp 查看文件

100
 #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM
100
 #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM
101
 
101
 
102
   void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
102
   void GcodeSuite::M907_report(const bool forReplay/*=true*/) {
103
-    report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS));
103
+    report_heading_etc(forReplay, F(STR_STEPPER_MOTOR_CURRENTS));
104
     #if HAS_MOTOR_CURRENT_PWM
104
     #if HAS_MOTOR_CURRENT_PWM
105
       SERIAL_ECHOLNPGM_P(                                    // PWM-based has 3 values:
105
       SERIAL_ECHOLNPGM_P(                                    // PWM-based has 3 values:
106
           PSTR("  M907 X"), stepper.motor_current_setting[0]  // X and Y
106
           PSTR("  M907 X"), stepper.motor_current_setting[0]  // X and Y

+ 3
- 3
Marlin/src/gcode/feature/fwretract/M207-M209.cpp 查看文件

38
 void GcodeSuite::M207() { fwretract.M207(); }
38
 void GcodeSuite::M207() { fwretract.M207(); }
39
 
39
 
40
 void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
40
 void GcodeSuite::M207_report(const bool forReplay/*=true*/) {
41
-  report_heading_etc(forReplay, PSTR(STR_RETRACT_S_F_Z));
41
+  report_heading_etc(forReplay, F(STR_RETRACT_S_F_Z));
42
   fwretract.M207_report();
42
   fwretract.M207_report();
43
 }
43
 }
44
 
44
 
53
 void GcodeSuite::M208() { fwretract.M208(); }
53
 void GcodeSuite::M208() { fwretract.M208(); }
54
 
54
 
55
 void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
55
 void GcodeSuite::M208_report(const bool forReplay/*=true*/) {
56
-  report_heading_etc(forReplay, PSTR(STR_RECOVER_S_F));
56
+  report_heading_etc(forReplay, F(STR_RECOVER_S_F));
57
   fwretract.M208_report();
57
   fwretract.M208_report();
58
 }
58
 }
59
 
59
 
68
   void GcodeSuite::M209() { fwretract.M209(); }
68
   void GcodeSuite::M209() { fwretract.M209(); }
69
 
69
 
70
   void GcodeSuite::M209_report(const bool forReplay/*=true*/) {
70
   void GcodeSuite::M209_report(const bool forReplay/*=true*/) {
71
-    report_heading_etc(forReplay, PSTR(STR_AUTO_RETRACT_S));
71
+    report_heading_etc(forReplay, F(STR_AUTO_RETRACT_S));
72
     fwretract.M209_report();
72
     fwretract.M209_report();
73
   }
73
   }
74
 
74
 

+ 1
- 1
Marlin/src/gcode/feature/pause/M603.cpp 查看文件

65
 }
65
 }
66
 
66
 
67
 void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
67
 void GcodeSuite::M603_report(const bool forReplay/*=true*/) {
68
-  report_heading(forReplay, PSTR(STR_FILAMENT_LOAD_UNLOAD));
68
+  report_heading(forReplay, F(STR_FILAMENT_LOAD_UNLOAD));
69
 
69
 
70
   #if EXTRUDERS == 1
70
   #if EXTRUDERS == 1
71
     report_echo_start(forReplay);
71
     report_echo_start(forReplay);

+ 1
- 1
Marlin/src/gcode/feature/powerloss/M413.cpp 查看文件

57
 }
57
 }
58
 
58
 
59
 void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
59
 void GcodeSuite::M413_report(const bool forReplay/*=true*/) {
60
-  report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY));
60
+  report_heading_etc(forReplay, F(STR_POWER_LOSS_RECOVERY));
61
   SERIAL_ECHOPGM("  M413 S", AS_DIGIT(recovery.enabled), " ; ");
61
   SERIAL_ECHOPGM("  M413 S", AS_DIGIT(recovery.enabled), " ; ");
62
   serialprintln_onoff(recovery.enabled);
62
   serialprintln_onoff(recovery.enabled);
63
 }
63
 }

+ 1
- 1
Marlin/src/gcode/feature/runout/M412.cpp 查看文件

67
 }
67
 }
68
 
68
 
69
 void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
69
 void GcodeSuite::M412_report(const bool forReplay/*=true*/) {
70
-  report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR));
70
+  report_heading_etc(forReplay, F(STR_FILAMENT_RUNOUT_SENSOR));
71
   SERIAL_ECHOPGM(
71
   SERIAL_ECHOPGM(
72
     "  M412 S", runout.enabled
72
     "  M412 S", runout.enabled
73
     #if HAS_FILAMENT_RUNOUT_DISTANCE
73
     #if HAS_FILAMENT_RUNOUT_DISTANCE

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M569.cpp 查看文件

139
 }
139
 }
140
 
140
 
141
 void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
141
 void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
142
-  report_heading(forReplay, PSTR(STR_DRIVER_STEPPING_MODE));
142
+  report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE));
143
 
143
 
144
   auto say_M569 = [](const bool forReplay, const char * const etc=nullptr, const bool eol=false) {
144
   auto say_M569 = [](const bool forReplay, const char * const etc=nullptr, const bool eol=false) {
145
     if (!forReplay) SERIAL_ECHO_START();
145
     if (!forReplay) SERIAL_ECHO_START();

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M906.cpp 查看文件

199
 }
199
 }
200
 
200
 
201
 void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
201
 void GcodeSuite::M906_report(const bool forReplay/*=true*/) {
202
-  report_heading(forReplay, PSTR(STR_STEPPER_DRIVER_CURRENT));
202
+  report_heading(forReplay, F(STR_STEPPER_DRIVER_CURRENT));
203
 
203
 
204
   auto say_M906 = [](const bool forReplay) {
204
   auto say_M906 = [](const bool forReplay) {
205
     report_echo_start(forReplay);
205
     report_echo_start(forReplay);

+ 2
- 2
Marlin/src/gcode/feature/trinamic/M911-M914.cpp 查看文件

311
   }
311
   }
312
 
312
 
313
   void GcodeSuite::M913_report(const bool forReplay/*=true*/) {
313
   void GcodeSuite::M913_report(const bool forReplay/*=true*/) {
314
-    report_heading(forReplay, PSTR(STR_HYBRID_THRESHOLD));
314
+    report_heading(forReplay, F(STR_HYBRID_THRESHOLD));
315
 
315
 
316
     auto say_M913 = [](const bool forReplay) {
316
     auto say_M913 = [](const bool forReplay) {
317
       report_echo_start(forReplay);
317
       report_echo_start(forReplay);
512
   }
512
   }
513
 
513
 
514
   void GcodeSuite::M914_report(const bool forReplay/*=true*/) {
514
   void GcodeSuite::M914_report(const bool forReplay/*=true*/) {
515
-    report_heading(forReplay, PSTR(STR_STALLGUARD_THRESHOLD));
515
+    report_heading(forReplay, F(STR_STALLGUARD_THRESHOLD));
516
 
516
 
517
     auto say_M914 = [](const bool forReplay) {
517
     auto say_M914 = [](const bool forReplay) {
518
       report_echo_start(forReplay);
518
       report_echo_start(forReplay);

+ 3
- 3
Marlin/src/gcode/gcode.cpp 查看文件

103
 #endif
103
 #endif
104
 
104
 
105
 void GcodeSuite::report_echo_start(const bool forReplay) { if (!forReplay) SERIAL_ECHO_START(); }
105
 void GcodeSuite::report_echo_start(const bool forReplay) { if (!forReplay) SERIAL_ECHO_START(); }
106
-void GcodeSuite::report_heading(const bool forReplay, PGM_P const pstr, const bool eol/*=true*/) {
106
+void GcodeSuite::report_heading(const bool forReplay, FSTR_P const fstr, const bool eol/*=true*/) {
107
   if (forReplay) return;
107
   if (forReplay) return;
108
-  if (pstr) {
108
+  if (fstr) {
109
     SERIAL_ECHO_START();
109
     SERIAL_ECHO_START();
110
     SERIAL_ECHOPGM("; ");
110
     SERIAL_ECHOPGM("; ");
111
-    SERIAL_ECHOPGM_P(pstr);
111
+    SERIAL_ECHOF(fstr);
112
   }
112
   }
113
   if (eol) { SERIAL_CHAR(':'); SERIAL_EOL(); }
113
   if (eol) { SERIAL_CHAR(':'); SERIAL_EOL(); }
114
 }
114
 }

+ 3
- 3
Marlin/src/gcode/gcode.h 查看文件

382
   }
382
   }
383
 
383
 
384
   static void report_echo_start(const bool forReplay);
384
   static void report_echo_start(const bool forReplay);
385
-  static void report_heading(const bool forReplay, PGM_P const pstr, const bool eol=true);
386
-  static inline void report_heading_etc(const bool forReplay, PGM_P const pstr, const bool eol=true) {
387
-    report_heading(forReplay, pstr, eol);
385
+  static void report_heading(const bool forReplay, FSTR_P const fstr, const bool eol=true);
386
+  static inline void report_heading_etc(const bool forReplay, FSTR_P const fstr, const bool eol=true) {
387
+    report_heading(forReplay, fstr, eol);
388
     report_echo_start(forReplay);
388
     report_echo_start(forReplay);
389
   }
389
   }
390
   static void say_units();
390
   static void say_units();

+ 1
- 1
Marlin/src/gcode/geometry/M206_M428.cpp 查看文件

53
 }
53
 }
54
 
54
 
55
 void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
55
 void GcodeSuite::M206_report(const bool forReplay/*=true*/) {
56
-  report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET));
56
+  report_heading_etc(forReplay, F(STR_HOME_OFFSET));
57
   SERIAL_ECHOLNPGM_P(
57
   SERIAL_ECHOLNPGM_P(
58
     #if IS_CARTESIAN
58
     #if IS_CARTESIAN
59
       LIST_N(DOUBLE(LINEAR_AXES),
59
       LIST_N(DOUBLE(LINEAR_AXES),

+ 1
- 1
Marlin/src/gcode/lcd/M145.cpp 查看文件

61
 }
61
 }
62
 
62
 
63
 void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
63
 void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
64
-  report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP));
64
+  report_heading(forReplay, F(STR_MATERIAL_HEATUP));
65
   LOOP_L_N(i, PREHEAT_COUNT) {
65
   LOOP_L_N(i, PREHEAT_COUNT) {
66
     report_echo_start(forReplay);
66
     report_echo_start(forReplay);
67
     SERIAL_ECHOLNPGM_P(
67
     SERIAL_ECHOLNPGM_P(

+ 1
- 1
Marlin/src/gcode/lcd/M250.cpp 查看文件

38
 }
38
 }
39
 
39
 
40
 void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
40
 void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
41
-  report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST));
41
+  report_heading_etc(forReplay, F(STR_LCD_CONTRAST));
42
   SERIAL_ECHOLNPGM("  M250 C", ui.contrast);
42
   SERIAL_ECHOLNPGM("  M250 C", ui.contrast);
43
 }
43
 }
44
 
44
 

+ 1
- 1
Marlin/src/gcode/lcd/M256.cpp 查看文件

37
 }
37
 }
38
 
38
 
39
 void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
39
 void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
40
-  report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS));
40
+  report_heading_etc(forReplay, F(STR_LCD_BRIGHTNESS));
41
   SERIAL_ECHOLNPGM("  M256 B", ui.brightness);
41
   SERIAL_ECHOLNPGM("  M256 B", ui.brightness);
42
 }
42
 }
43
 
43
 

+ 1
- 1
Marlin/src/gcode/lcd/M414.cpp 查看文件

44
 }
44
 }
45
 
45
 
46
 void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
46
 void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
47
-  report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE));
47
+  report_heading_etc(forReplay, F(STR_UI_LANGUAGE));
48
   SERIAL_ECHOLNPGM("  M414 S", ui.language);
48
   SERIAL_ECHOLNPGM("  M414 S", ui.language);
49
 }
49
 }
50
 
50
 

+ 1
- 1
Marlin/src/gcode/probe/M851.cpp 查看文件

84
 }
84
 }
85
 
85
 
86
 void GcodeSuite::M851_report(const bool forReplay/*=true*/) {
86
 void GcodeSuite::M851_report(const bool forReplay/*=true*/) {
87
-  report_heading_etc(forReplay, PSTR(STR_Z_PROBE_OFFSET));
87
+  report_heading_etc(forReplay, F(STR_Z_PROBE_OFFSET));
88
   SERIAL_ECHOPGM_P(
88
   SERIAL_ECHOPGM_P(
89
     #if HAS_PROBE_XY_OFFSET
89
     #if HAS_PROBE_XY_OFFSET
90
       PSTR("  M851 X"), LINEAR_UNIT(probe.offset_xy.x),
90
       PSTR("  M851 X"), LINEAR_UNIT(probe.offset_xy.x),

+ 1
- 1
Marlin/src/gcode/units/M149.cpp 查看文件

37
 }
37
 }
38
 
38
 
39
 void GcodeSuite::M149_report(const bool forReplay/*=true*/) {
39
 void GcodeSuite::M149_report(const bool forReplay/*=true*/) {
40
-  report_heading_etc(forReplay, PSTR(STR_TEMPERATURE_UNITS));
40
+  report_heading_etc(forReplay, F(STR_TEMPERATURE_UNITS));
41
   SERIAL_ECHOPGM("  M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in ");
41
   SERIAL_ECHOPGM("  M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in ");
42
   SERIAL_ECHOLNF(parser.temp_units_name());
42
   SERIAL_ECHOLNF(parser.temp_units_name());
43
 }
43
 }

+ 1
- 1
Marlin/src/module/settings.cpp 查看文件

3037
   #define CONFIG_ECHO_START()       gcode.report_echo_start(forReplay)
3037
   #define CONFIG_ECHO_START()       gcode.report_echo_start(forReplay)
3038
   #define CONFIG_ECHO_MSG(V...)     do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0)
3038
   #define CONFIG_ECHO_MSG(V...)     do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0)
3039
   #define CONFIG_ECHO_MSG_P(V...)   do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0)
3039
   #define CONFIG_ECHO_MSG_P(V...)   do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0)
3040
-  #define CONFIG_ECHO_HEADING(STR)  gcode.report_heading(forReplay, PSTR(STR))
3040
+  #define CONFIG_ECHO_HEADING(STR)  gcode.report_heading(forReplay, F(STR))
3041
 
3041
 
3042
   void M92_report(const bool echo=true, const int8_t e=-1);
3042
   void M92_report(const bool echo=true, const int8_t e=-1);
3043
 
3043
 

+ 1
- 1
Marlin/src/module/temperature.cpp 查看文件

1727
   }
1727
   }
1728
 
1728
 
1729
   void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) {
1729
   void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) {
1730
-    gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS));
1730
+    gcode.report_heading_etc(forReplay, F(STR_USER_THERMISTORS));
1731
     SERIAL_ECHOPGM("  M305 P", AS_DIGIT(t_index));
1731
     SERIAL_ECHOPGM("  M305 P", AS_DIGIT(t_index));
1732
 
1732
 
1733
     const user_thermistor_t &t = user_thermistor[t_index];
1733
     const user_thermistor_t &t = user_thermistor[t_index];

Loading…
取消
儲存