Просмотр исходного кода

Optimize G-code flag parameters (#21849)

Scott Lahteine 3 лет назад
Родитель
Сommit
49548c343d
Аккаунт пользователя с таким Email не найден

+ 20
- 20
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Просмотреть файл

306
   if (G29_parse_parameters()) return; // Abort on parameter error
306
   if (G29_parse_parameters()) return; // Abort on parameter error
307
 
307
 
308
   const int8_t p_val = parser.intval('P', -1);
308
   const int8_t p_val = parser.intval('P', -1);
309
-  const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J');
309
+  const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
310
   #if ENABLED(HAS_MULTI_HOTEND)
310
   #if ENABLED(HAS_MULTI_HOTEND)
311
     const uint8_t old_tool_index = active_extruder;
311
     const uint8_t old_tool_index = active_extruder;
312
   #endif
312
   #endif
315
   if (may_move) {
315
   if (may_move) {
316
     planner.synchronize();
316
     planner.synchronize();
317
     // Send 'N' to force homing before G29 (internal only)
317
     // Send 'N' to force homing before G29 (internal only)
318
-    if (axes_should_home() || parser.seen('N')) gcode.home_all_axes();
318
+    if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes();
319
     TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0));
319
     TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0));
320
   }
320
   }
321
 
321
 
380
         // Allow the user to specify the height because 10mm is a little extreme in some cases.
380
         // Allow the user to specify the height because 10mm is a little extreme in some cases.
381
         for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++)     // Create a rectangular raised area in
381
         for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++)     // Create a rectangular raised area in
382
           for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed
382
           for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed
383
-            z_values[x][y] += parser.seen('C') ? param.C_constant : 9.99f;
383
+            z_values[x][y] += parser.seen_test('C') ? param.C_constant : 9.99f;
384
             TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y]));
384
             TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y]));
385
           }
385
           }
386
         break;
386
         break;
389
 
389
 
390
   #if HAS_BED_PROBE
390
   #if HAS_BED_PROBE
391
 
391
 
392
-    if (parser.seen('J')) {
392
+    if (parser.seen_test('J')) {
393
       save_ubl_active_state_and_disable();
393
       save_ubl_active_state_and_disable();
394
       tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
394
       tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point
395
       restore_ubl_active_state_and_leave();
395
       restore_ubl_active_state_and_leave();
402
 
402
 
403
   #endif // HAS_BED_PROBE
403
   #endif // HAS_BED_PROBE
404
 
404
 
405
-  if (parser.seen('P')) {
405
+  if (parser.seen_test('P')) {
406
     if (WITHIN(param.P_phase, 0, 1) && storage_slot == -1) {
406
     if (WITHIN(param.P_phase, 0, 1) && storage_slot == -1) {
407
       storage_slot = 0;
407
       storage_slot = 0;
408
       SERIAL_ECHOLNPGM("Default storage slot 0 selected.");
408
       SERIAL_ECHOLNPGM("Default storage slot 0 selected.");
423
           //
423
           //
424
           // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
424
           // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe
425
           //
425
           //
426
-          if (!parser.seen('C')) {
426
+          if (!parser.seen_test('C')) {
427
             invalidate();
427
             invalidate();
428
             SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
428
             SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
429
           }
429
           }
433
             SERIAL_DECIMAL(param.XY_pos.y);
433
             SERIAL_DECIMAL(param.XY_pos.y);
434
             SERIAL_ECHOLNPGM(").\n");
434
             SERIAL_ECHOLNPGM(").\n");
435
           }
435
           }
436
-          probe_entire_mesh(param.XY_pos, parser.seen('T'), parser.seen('E'), parser.seen('U'));
436
+          probe_entire_mesh(param.XY_pos, parser.seen_test('T'), parser.seen_test('E'), parser.seen_test('U'));
437
 
437
 
438
           report_current_position();
438
           report_current_position();
439
           probe_deployed = true;
439
           probe_deployed = true;
449
           SERIAL_ECHOLNPGM("Manually probing unreachable points.");
449
           SERIAL_ECHOLNPGM("Manually probing unreachable points.");
450
           do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
450
           do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
451
 
451
 
452
-          if (parser.seen('C') && !param.XY_seen) {
452
+          if (parser.seen_test('C') && !param.XY_seen) {
453
 
453
 
454
             /**
454
             /**
455
              * Use a good default location for the path.
455
              * Use a good default location for the path.
483
           }
483
           }
484
 
484
 
485
           const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES);
485
           const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES);
486
-          manually_probe_remaining_mesh(param.XY_pos, height, param.B_shim_thickness, parser.seen('T'));
486
+          manually_probe_remaining_mesh(param.XY_pos, height, param.B_shim_thickness, parser.seen_test('T'));
487
 
487
 
488
           SERIAL_ECHOLNPGM("G29 P2 finished.");
488
           SERIAL_ECHOLNPGM("G29 P2 finished.");
489
 
489
 
555
 
555
 
556
       case 4: // Fine Tune (i.e., Edit) the Mesh
556
       case 4: // Fine Tune (i.e., Edit) the Mesh
557
         #if HAS_LCD_MENU
557
         #if HAS_LCD_MENU
558
-          fine_tune_mesh(param.XY_pos, parser.seen('T'));
558
+          fine_tune_mesh(param.XY_pos, parser.seen_test('T'));
559
         #else
559
         #else
560
           SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present.");
560
           SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present.");
561
           return;
561
           return;
574
     // Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
574
     // Much of the 'What?' command can be eliminated. But until we are fully debugged, it is
575
     // good to have the extra information. Soon... we prune this to just a few items
575
     // good to have the extra information. Soon... we prune this to just a few items
576
     //
576
     //
577
-    if (parser.seen('W')) g29_what_command();
577
+    if (parser.seen_test('W')) g29_what_command();
578
 
578
 
579
     //
579
     //
580
     // When we are fully debugged, this may go away. But there are some valid
580
     // When we are fully debugged, this may go away. But there are some valid
581
     // use cases for the users. So we can wait and see what to do with it.
581
     // use cases for the users. So we can wait and see what to do with it.
582
     //
582
     //
583
 
583
 
584
-    if (parser.seen('K')) // Kompare Current Mesh Data to Specified Stored Mesh
584
+    if (parser.seen_test('K')) // Kompare Current Mesh Data to Specified Stored Mesh
585
       g29_compare_current_mesh_to_stored_mesh();
585
       g29_compare_current_mesh_to_stored_mesh();
586
 
586
 
587
   #endif // UBL_DEVEL_DEBUGGING
587
   #endif // UBL_DEVEL_DEBUGGING
640
     SERIAL_ECHOLNPGM("Done.");
640
     SERIAL_ECHOLNPGM("Done.");
641
   }
641
   }
642
 
642
 
643
-  if (parser.seen('T'))
643
+  if (parser.seen_test('T'))
644
     display_map(param.T_map_type);
644
     display_map(param.T_map_type);
645
 
645
 
646
   LEAVE:
646
   LEAVE:
915
 
915
 
916
       if (do_ubl_mesh_map) display_map(param.T_map_type);   // Show user where we're probing
916
       if (do_ubl_mesh_map) display_map(param.T_map_type);   // Show user where we're probing
917
 
917
 
918
-      if (parser.seen('B')) {
918
+      if (parser.seen_test('B')) {
919
         SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
919
         SERIAL_ECHOPGM_P(GET_TEXT(MSG_UBL_BC_INSERT));
920
         LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
920
         LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
921
       }
921
       }
954
    *          NOTE: Blocks the G-code queue and captures Marlin UI during use.
954
    *          NOTE: Blocks the G-code queue and captures Marlin UI during use.
955
    */
955
    */
956
   void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) {
956
   void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) {
957
-    if (!parser.seen('R'))        // fine_tune_mesh() is special. If no repetition count flag is specified
957
+    if (!parser.seen_test('R')) // fine_tune_mesh() is special. If no repetition count flag is specified
958
       param.R_repetition = 1;   // do exactly one mesh location. Otherwise use what the parser decided.
958
       param.R_repetition = 1;   // do exactly one mesh location. Otherwise use what the parser decided.
959
 
959
 
960
     #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
960
     #if ENABLED(UBL_MESH_EDIT_MOVES_Z)
1091
     }
1091
     }
1092
   }
1092
   }
1093
 
1093
 
1094
-  param.V_verbosity = parser.seen('V') ? parser.value_int() : 0;
1094
+  param.V_verbosity = parser.intval('V');
1095
   if (!WITHIN(param.V_verbosity, 0, 4)) {
1095
   if (!WITHIN(param.V_verbosity, 0, 4)) {
1096
     SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n");
1096
     SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n");
1097
     err_flag = true;
1097
     err_flag = true;
1153
    *       Leveling is being enabled here with old data, possibly
1153
    *       Leveling is being enabled here with old data, possibly
1154
    *       none. Error handling should disable for safety...
1154
    *       none. Error handling should disable for safety...
1155
    */
1155
    */
1156
-  if (parser.seen('A')) {
1157
-    if (parser.seen('D')) {
1156
+  if (parser.seen_test('A')) {
1157
+    if (parser.seen_test('D')) {
1158
       SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n");
1158
       SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n");
1159
       return UBL_ERR;
1159
       return UBL_ERR;
1160
     }
1160
     }
1161
     set_bed_leveling_enabled(true);
1161
     set_bed_leveling_enabled(true);
1162
     report_state();
1162
     report_state();
1163
   }
1163
   }
1164
-  else if (parser.seen('D')) {
1164
+  else if (parser.seen_test('D')) {
1165
     set_bed_leveling_enabled(false);
1165
     set_bed_leveling_enabled(false);
1166
     report_state();
1166
     report_state();
1167
   }
1167
   }
1520
             SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
1520
             SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n");
1521
             TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
1521
             TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points));
1522
 
1522
 
1523
-            measured_z = probe.probe_at_point(rpos, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
1523
+            measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling
1524
 
1524
 
1525
             abort_flag = isnan(measured_z);
1525
             abort_flag = isnan(measured_z);
1526
 
1526
 

+ 7
- 7
Marlin/src/feature/encoder_i2c.cpp Просмотреть файл

819
 void I2CPositionEncodersMgr::M860() {
819
 void I2CPositionEncodersMgr::M860() {
820
   if (parse()) return;
820
   if (parse()) return;
821
 
821
 
822
-  const bool hasU = parser.seen('U'), hasO = parser.seen('O');
822
+  const bool hasU = parser.seen_test('U'), hasO = parser.seen_test('O');
823
 
823
 
824
   if (I2CPE_idx == 0xFF) {
824
   if (I2CPE_idx == 0xFF) {
825
     LOOP_XYZE(i) {
825
     LOOP_XYZE(i) {
826
-      if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) {
826
+      if (!I2CPE_anyaxis || parser.seen_test(axis_codes[i])) {
827
         const uint8_t idx = idx_from_axis(AxisEnum(i));
827
         const uint8_t idx = idx_from_axis(AxisEnum(i));
828
         if ((int8_t)idx >= 0) report_position(idx, hasU, hasO);
828
         if ((int8_t)idx >= 0) report_position(idx, hasU, hasO);
829
       }
829
       }
956
     return;
956
     return;
957
   }
957
   }
958
   else {
958
   else {
959
-         if (parser.seen('X')) newAddress = I2CPE_PRESET_ADDR_X;
960
-    else if (parser.seen('Y')) newAddress = I2CPE_PRESET_ADDR_Y;
961
-    else if (parser.seen('Z')) newAddress = I2CPE_PRESET_ADDR_Z;
962
-    else if (parser.seen('E')) newAddress = I2CPE_PRESET_ADDR_E;
959
+         if (parser.seen_test('X')) newAddress = I2CPE_PRESET_ADDR_X;
960
+    else if (parser.seen_test('Y')) newAddress = I2CPE_PRESET_ADDR_Y;
961
+    else if (parser.seen_test('Z')) newAddress = I2CPE_PRESET_ADDR_Z;
962
+    else if (parser.seen_test('E')) newAddress = I2CPE_PRESET_ADDR_E;
963
     else return;
963
     else return;
964
   }
964
   }
965
 
965
 
1012
 void I2CPositionEncodersMgr::M866() {
1012
 void I2CPositionEncodersMgr::M866() {
1013
   if (parse()) return;
1013
   if (parse()) return;
1014
 
1014
 
1015
-  const bool hasR = parser.seen('R');
1015
+  const bool hasR = parser.seen_test('R');
1016
 
1016
 
1017
   if (I2CPE_idx == 0xFF) {
1017
   if (I2CPE_idx == 0xFF) {
1018
     LOOP_XYZE(i) {
1018
     LOOP_XYZE(i) {

+ 7
- 7
Marlin/src/feature/fwretract.cpp Просмотреть файл

212
  */
212
  */
213
 void FWRetract::M207() {
213
 void FWRetract::M207() {
214
   if (!parser.seen("FSWZ")) return M207_report();
214
   if (!parser.seen("FSWZ")) return M207_report();
215
-  if (parser.seen('S')) settings.retract_length = parser.value_axis_units(E_AXIS);
216
-  if (parser.seen('F')) settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
217
-  if (parser.seen('Z')) settings.retract_zraise = parser.value_linear_units();
218
-  if (parser.seen('W')) settings.swap_retract_length = parser.value_axis_units(E_AXIS);
215
+  if (parser.seenval('S')) settings.retract_length        = parser.value_axis_units(E_AXIS);
216
+  if (parser.seenval('F')) settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
217
+  if (parser.seenval('Z')) settings.retract_zraise        = parser.value_linear_units();
218
+  if (parser.seenval('W')) settings.swap_retract_length   = parser.value_axis_units(E_AXIS);
219
 }
219
 }
220
 
220
 
221
 void FWRetract::M207_report(const bool forReplay/*=false*/) {
221
 void FWRetract::M207_report(const bool forReplay/*=false*/) {
238
  */
238
  */
239
 void FWRetract::M208() {
239
 void FWRetract::M208() {
240
   if (!parser.seen("FSRW")) return M208_report();
240
   if (!parser.seen("FSRW")) return M208_report();
241
-  if (parser.seen('S')) settings.retract_recover_extra = parser.value_axis_units(E_AXIS);
242
-  if (parser.seen('F')) settings.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
241
+  if (parser.seen('S')) settings.retract_recover_extra              = parser.value_axis_units(E_AXIS);
242
+  if (parser.seen('F')) settings.retract_recover_feedrate_mm_s      = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
243
   if (parser.seen('R')) settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
243
   if (parser.seen('R')) settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS));
244
-  if (parser.seen('W')) settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS);
244
+  if (parser.seen('W')) settings.swap_retract_recover_extra         = parser.value_axis_units(E_AXIS);
245
 }
245
 }
246
 
246
 
247
 void FWRetract::M208_report(const bool forReplay/*=false*/) {
247
 void FWRetract::M208_report(const bool forReplay/*=false*/) {

+ 4
- 4
Marlin/src/gcode/bedlevel/G26.cpp Просмотреть файл

648
   #if HAS_LCD_MENU
648
   #if HAS_LCD_MENU
649
     g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
649
     g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
650
   #else
650
   #else
651
-    if (!parser.seen('R')) {
651
+    if (parser.seen('R'))
652
+      g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
653
+    else {
652
       SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD.");
654
       SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD.");
653
       return;
655
       return;
654
     }
656
     }
655
-    else
656
-      g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
657
   #endif
657
   #endif
658
   if (g26_repeats < 1) {
658
   if (g26_repeats < 1) {
659
     SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1.");
659
     SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1.");
671
   /**
671
   /**
672
    * Wait until all parameters are verified before altering the state!
672
    * Wait until all parameters are verified before altering the state!
673
    */
673
    */
674
-  set_bed_leveling_enabled(!parser.seen('D'));
674
+  set_bed_leveling_enabled(!parser.seen_test('D'));
675
 
675
 
676
   do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
676
   do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES);
677
 
677
 

+ 1
- 1
Marlin/src/gcode/bedlevel/M420.cpp Просмотреть файл

133
 
133
 
134
   #endif // AUTO_BED_LEVELING_UBL
134
   #endif // AUTO_BED_LEVELING_UBL
135
 
135
 
136
-  const bool seenV = parser.seen('V');
136
+  const bool seenV = parser.seen_test('V');
137
 
137
 
138
   #if HAS_MESH
138
   #if HAS_MESH
139
 
139
 

+ 6
- 6
Marlin/src/gcode/bedlevel/abl/G29.cpp Просмотреть файл

223
 
223
 
224
   reset_stepper_timeout();
224
   reset_stepper_timeout();
225
 
225
 
226
-  const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen('Q');
226
+  const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q');
227
 
227
 
228
   // G29 Q is also available if debugging
228
   // G29 Q is also available if debugging
229
   #if ENABLED(DEBUG_LEVELING_FEATURE)
229
   #if ENABLED(DEBUG_LEVELING_FEATURE)
235
     if (DISABLED(PROBE_MANUALLY) && seenQ) G29_RETURN(false);
235
     if (DISABLED(PROBE_MANUALLY) && seenQ) G29_RETURN(false);
236
   #endif
236
   #endif
237
 
237
 
238
-  const bool seenA = TERN0(PROBE_MANUALLY, parser.seen('A')),
238
+  const bool seenA = TERN0(PROBE_MANUALLY, parser.seen_test('A')),
239
          no_action = seenA || seenQ,
239
          no_action = seenA || seenQ,
240
               faux = ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY) ? parser.boolval('C') : no_action;
240
               faux = ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY) ? parser.boolval('C') : no_action;
241
 
241
 
245
   }
245
   }
246
 
246
 
247
   // Send 'N' to force homing before G29 (internal only)
247
   // Send 'N' to force homing before G29 (internal only)
248
-  if (parser.seen('N'))
248
+  if (parser.seen_test('N'))
249
     process_subcommands_now_P(TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR));
249
     process_subcommands_now_P(TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR));
250
 
250
 
251
   // Don't allow auto-leveling without homing first
251
   // Don't allow auto-leveling without homing first
275
 
275
 
276
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
276
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
277
 
277
 
278
-      const bool seen_w = parser.seen('W');
278
+      const bool seen_w = parser.seen_test('W');
279
       if (seen_w) {
279
       if (seen_w) {
280
         if (!leveling_is_valid()) {
280
         if (!leveling_is_valid()) {
281
           SERIAL_ERROR_MSG("No bilinear grid");
281
           SERIAL_ERROR_MSG("No bilinear grid");
308
           if (abl.reenable) report_current_position();
308
           if (abl.reenable) report_current_position();
309
         }
309
         }
310
         G29_RETURN(false);
310
         G29_RETURN(false);
311
-      } // parser.seen('W')
311
+      } // parser.seen_test('W')
312
 
312
 
313
     #else
313
     #else
314
 
314
 
317
     #endif
317
     #endif
318
 
318
 
319
     // Jettison bed leveling data
319
     // Jettison bed leveling data
320
-    if (!seen_w && parser.seen('J')) {
320
+    if (!seen_w && parser.seen_test('J')) {
321
       reset_bed_level();
321
       reset_bed_level();
322
       G29_RETURN(false);
322
       G29_RETURN(false);
323
     }
323
     }

+ 1
- 1
Marlin/src/gcode/bedlevel/mbl/G29.cpp Просмотреть файл

87
       mbl.reset();
87
       mbl.reset();
88
       mbl_probe_index = 0;
88
       mbl_probe_index = 0;
89
       if (!ui.wait_for_move) {
89
       if (!ui.wait_for_move) {
90
-        queue.inject_P(parser.seen('N') ? PSTR("G28" TERN(G28_L0_ENSURES_LEVELING_OFF, "L0", "") "\nG29S2") : PSTR("G29S2"));
90
+        queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(G28_L0_ENSURES_LEVELING_OFF, "L0", "") "\nG29S2") : PSTR("G29S2"));
91
         return;
91
         return;
92
       }
92
       }
93
       state = MeshNext;
93
       state = MeshNext;

+ 14
- 11
Marlin/src/gcode/bedlevel/ubl/M421.cpp Просмотреть файл

21
  */
21
  */
22
 
22
 
23
 /**
23
 /**
24
- * unified.cpp - Unified Bed Leveling
24
+ * M421.cpp - Unified Bed Leveling
25
  */
25
  */
26
 
26
 
27
 #include "../../../inc/MarlinConfig.h"
27
 #include "../../../inc/MarlinConfig.h"
39
  * M421: Set a single Mesh Bed Leveling Z coordinate
39
  * M421: Set a single Mesh Bed Leveling Z coordinate
40
  *
40
  *
41
  * Usage:
41
  * Usage:
42
- *   M421 I<xindex> J<yindex> Z<linear>
43
- *   M421 I<xindex> J<yindex> Q<offset>
44
- *   M421 I<xindex> J<yindex> N
45
- *   M421 C Z<linear>
46
- *   M421 C Q<offset>
42
+ *   M421 I<xindex> J<yindex> Z<linear>  : Set the Mesh Point IJ to the Z value
43
+ *   M421 I<xindex> J<yindex> Q<offset>  : Add the Q value to the Mesh Point IJ
44
+ *   M421 I<xindex> J<yindex> N          : Set the Mesh Point IJ to NAN (not set)
45
+ *   M421 C Z<linear>                    : Set the closest Mesh Point to the Z value
46
+ *   M421 C Q<offset>                    : Add the Q value to the closest Mesh Point
47
  */
47
  */
48
 void GcodeSuite::M421() {
48
 void GcodeSuite::M421() {
49
   xy_int8_t ij = { int8_t(parser.intval('I', -1)), int8_t(parser.intval('J', -1)) };
49
   xy_int8_t ij = { int8_t(parser.intval('I', -1)), int8_t(parser.intval('J', -1)) };
50
   const bool hasI = ij.x >= 0,
50
   const bool hasI = ij.x >= 0,
51
              hasJ = ij.y >= 0,
51
              hasJ = ij.y >= 0,
52
-             hasC = parser.seen('C'),
53
-             hasN = parser.seen('N'),
52
+             hasC = parser.seen_test('C'),
53
+             hasN = parser.seen_test('N'),
54
              hasZ = parser.seen('Z'),
54
              hasZ = parser.seen('Z'),
55
              hasQ = !hasZ && parser.seen('Q');
55
              hasQ = !hasZ && parser.seen('Q');
56
 
56
 
57
   if (hasC) ij = ubl.find_closest_mesh_point_of_type(CLOSEST, current_position);
57
   if (hasC) ij = ubl.find_closest_mesh_point_of_type(CLOSEST, current_position);
58
 
58
 
59
+  // Test for bad parameter combinations
59
   if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN))
60
   if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN))
60
     SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
61
     SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS);
62
+
63
+  // Test for I J out of range
61
   else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
64
   else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1))
62
     SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
65
     SERIAL_ERROR_MSG(STR_ERR_MESH_XY);
63
   else {
66
   else {
64
-    float &zval = ubl.z_values[ij.x][ij.y];
65
-    zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0);
66
-    TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval));
67
+    float &zval = ubl.z_values[ij.x][ij.y];                               // Altering this Mesh Point
68
+    zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0);  // N=NAN, Z=NEWVAL, or Q=ADDVAL
69
+    TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval));          // Ping ExtUI in case it's showing the mesh
67
   }
70
   }
68
 }
71
 }
69
 
72
 

+ 3
- 3
Marlin/src/gcode/calibrate/G28.cpp Просмотреть файл

219
   #endif
219
   #endif
220
 
220
 
221
   #if ENABLED(MARLIN_DEV_MODE)
221
   #if ENABLED(MARLIN_DEV_MODE)
222
-    if (parser.seen('S')) {
222
+    if (parser.seen_test('S')) {
223
       LOOP_XYZ(a) set_axis_is_at_home((AxisEnum)a);
223
       LOOP_XYZ(a) set_axis_is_at_home((AxisEnum)a);
224
       sync_plan_position();
224
       sync_plan_position();
225
       SERIAL_ECHOLNPGM("Simulated Homing");
225
       SERIAL_ECHOLNPGM("Simulated Homing");
321
 
321
 
322
   #else
322
   #else
323
 
323
 
324
-    const bool homeZ = parser.seen('Z'),
324
+    const bool homeZ = parser.seen_test('Z'),
325
                needX = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(X_AXIS))),
325
                needX = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(X_AXIS))),
326
                needY = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(Y_AXIS))),
326
                needY = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(Y_AXIS))),
327
-               homeX = needX || parser.seen('X'), homeY = needY || parser.seen('Y'),
327
+               homeX = needX || parser.seen_test('X'), homeY = needY || parser.seen_test('Y'),
328
                home_all = homeX == homeY && homeX == homeZ, // All or None
328
                home_all = homeX == homeY && homeX == homeZ, // All or None
329
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
329
                doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ;
330
 
330
 

+ 2
- 2
Marlin/src/gcode/calibrate/G33.cpp Просмотреть файл

395
     return;
395
     return;
396
   }
396
   }
397
 
397
 
398
-  const bool towers_set = !parser.seen('T');
398
+  const bool towers_set = !parser.seen_test('T');
399
 
399
 
400
   const float calibration_precision = parser.floatval('C', 0.0f);
400
   const float calibration_precision = parser.floatval('C', 0.0f);
401
   if (calibration_precision < 0) {
401
   if (calibration_precision < 0) {
415
     return;
415
     return;
416
   }
416
   }
417
 
417
 
418
-  const bool stow_after_each = parser.seen('E');
418
+  const bool stow_after_each = parser.seen_test('E');
419
 
419
 
420
   const bool _0p_calibration      = probe_points == 0,
420
   const bool _0p_calibration      = probe_points == 0,
421
              _1p_calibration      = probe_points == 1 || probe_points == -1,
421
              _1p_calibration      = probe_points == 1 || probe_points == -1,

+ 1
- 1
Marlin/src/gcode/feature/pause/M125.cpp Просмотреть файл

56
  */
56
  */
57
 void GcodeSuite::M125() {
57
 void GcodeSuite::M125() {
58
   // Initial retract before move to filament change position
58
   // Initial retract before move to filament change position
59
-  const float retract = -ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : (PAUSE_PARK_RETRACT_LENGTH));
59
+  const float retract = -ABS(parser.axisunitsval('L', E_AXIS, PAUSE_PARK_RETRACT_LENGTH));
60
 
60
 
61
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
61
   xyz_pos_t park_point = NOZZLE_PARK_POINT;
62
 
62
 

+ 5
- 9
Marlin/src/gcode/feature/pause/M600.cpp Просмотреть файл

81
 
81
 
82
   #if ENABLED(DUAL_X_CARRIAGE)
82
   #if ENABLED(DUAL_X_CARRIAGE)
83
     int8_t DXC_ext = target_extruder;
83
     int8_t DXC_ext = target_extruder;
84
-    if (!parser.seen('T')) {  // If no tool index is specified, M600 was (probably) sent in response to filament runout.
85
-                              // In this case, for duplicating modes set DXC_ext to the extruder that ran out.
84
+    if (!parser.seen_test('T')) {  // If no tool index is specified, M600 was (probably) sent in response to filament runout.
85
+                                   // In this case, for duplicating modes set DXC_ext to the extruder that ran out.
86
       #if MULTI_FILAMENT_SENSOR
86
       #if MULTI_FILAMENT_SENSOR
87
         if (idex_is_duplicating())
87
         if (idex_is_duplicating())
88
           DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT2_STATE) ? 1 : 0;
88
           DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT2_STATE) ? 1 : 0;
110
   #endif
110
   #endif
111
 
111
 
112
   // Initial retract before move to filament change position
112
   // Initial retract before move to filament change position
113
-  const float retract = -ABS(parser.seen('E') ? parser.value_axis_units(E_AXIS) : (PAUSE_PARK_RETRACT_LENGTH));
113
+  const float retract = -ABS(parser.axisunitsval('E', E_AXIS, PAUSE_PARK_RETRACT_LENGTH));
114
 
114
 
115
   xyz_pos_t park_point NOZZLE_PARK_POINT;
115
   xyz_pos_t park_point NOZZLE_PARK_POINT;
116
 
116
 
132
                     fast_load_length = 0.0f;
132
                     fast_load_length = 0.0f;
133
   #else
133
   #else
134
     // Unload filament
134
     // Unload filament
135
-    const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS)
136
-                                                      : fc_settings[active_extruder].unload_length);
137
-
135
+    const float unload_length = -ABS(parser.axisunitsval('U', E_AXIS, fc_settings[active_extruder].unload_length));
138
     // Slow load filament
136
     // Slow load filament
139
     constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
137
     constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH;
140
-
141
     // Fast load filament
138
     // Fast load filament
142
-    const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS)
143
-                                                        : fc_settings[active_extruder].load_length);
139
+    const float fast_load_length = ABS(parser.axisunitsval('L', E_AXIS, fc_settings[active_extruder].load_length));
144
   #endif
140
   #endif
145
 
141
 
146
   const int beep_count = parser.intval('B', -1
142
   const int beep_count = parser.intval('B', -1

+ 2
- 2
Marlin/src/gcode/feature/powerloss/M1000.cpp Просмотреть файл

59
 void GcodeSuite::M1000() {
59
 void GcodeSuite::M1000() {
60
 
60
 
61
   if (recovery.valid()) {
61
   if (recovery.valid()) {
62
-    if (parser.seen('S')) {
62
+    if (parser.seen_test('S')) {
63
       #if HAS_LCD_MENU
63
       #if HAS_LCD_MENU
64
         ui.goto_screen(menu_job_recovery);
64
         ui.goto_screen(menu_job_recovery);
65
       #elif ENABLED(DWIN_CREALITY_LCD)
65
       #elif ENABLED(DWIN_CREALITY_LCD)
70
         SERIAL_ECHO_MSG("Resume requires LCD.");
70
         SERIAL_ECHO_MSG("Resume requires LCD.");
71
       #endif
71
       #endif
72
     }
72
     }
73
-    else if (parser.seen('C')) {
73
+    else if (parser.seen_test('C')) {
74
       #if HAS_LCD_MENU
74
       #if HAS_LCD_MENU
75
         lcd_power_loss_recovery_cancel();
75
         lcd_power_loss_recovery_cancel();
76
       #else
76
       #else

+ 6
- 6
Marlin/src/gcode/feature/powerloss/M413.cpp Просмотреть файл

48
 
48
 
49
   #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
49
   #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
50
     if (parser.seen("RL")) recovery.load();
50
     if (parser.seen("RL")) recovery.load();
51
-    if (parser.seen('W')) recovery.save(true);
52
-    if (parser.seen('P')) recovery.purge();
53
-    if (parser.seen('D')) recovery.debug(PSTR("M413"));
51
+    if (parser.seen_test('W')) recovery.save(true);
52
+    if (parser.seen_test('P')) recovery.purge();
53
+    if (parser.seen_test('D')) recovery.debug(PSTR("M413"));
54
     #if PIN_EXISTS(POWER_LOSS)
54
     #if PIN_EXISTS(POWER_LOSS)
55
-      if (parser.seen('O')) recovery._outage();
55
+      if (parser.seen_test('O')) recovery._outage();
56
     #endif
56
     #endif
57
-    if (parser.seen('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
58
-    if (parser.seen('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
57
+    if (parser.seen_test('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
58
+    if (parser.seen_test('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
59
   #endif
59
   #endif
60
 }
60
 }
61
 
61
 

+ 1
- 1
Marlin/src/gcode/feature/runout/M412.cpp Просмотреть файл

44
     #if ENABLED(HOST_ACTION_COMMANDS)
44
     #if ENABLED(HOST_ACTION_COMMANDS)
45
       if (parser.seen('H')) runout.host_handling = parser.value_bool();
45
       if (parser.seen('H')) runout.host_handling = parser.value_bool();
46
     #endif
46
     #endif
47
-    const bool seenR = parser.seen('R'), seenS = parser.seen('S');
47
+    const bool seenR = parser.seen_test('R'), seenS = parser.seen('S');
48
     if (seenR || seenS) runout.reset();
48
     if (seenR || seenS) runout.reset();
49
     if (seenS) runout.enabled = parser.value_bool();
49
     if (seenS) runout.enabled = parser.value_bool();
50
     #if HAS_FILAMENT_RUNOUT_DISTANCE
50
     #if HAS_FILAMENT_RUNOUT_DISTANCE

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M122.cpp Просмотреть файл

48
       tmc_set_report_interval(interval);
48
       tmc_set_report_interval(interval);
49
     #endif
49
     #endif
50
 
50
 
51
-    if (parser.seen('V'))
51
+    if (parser.seen_test('V'))
52
       tmc_get_registers(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
52
       tmc_get_registers(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
53
     else
53
     else
54
       tmc_report_all(print_axis.x, print_axis.y, print_axis.z, print_axis.e);
54
       tmc_report_all(print_axis.x, print_axis.y, print_axis.z, print_axis.e);

+ 1
- 1
Marlin/src/gcode/gcode_d.cpp Просмотреть файл

52
         break;
52
         break;
53
 
53
 
54
       case 10:
54
       case 10:
55
-        kill(PSTR("D10"), PSTR("KILL TEST"), parser.seen('P'));
55
+        kill(PSTR("D10"), PSTR("KILL TEST"), parser.seen_test('P'));
56
         break;
56
         break;
57
 
57
 
58
       case 1: {
58
       case 1: {

+ 3
- 3
Marlin/src/gcode/host/M114.cpp Просмотреть файл

193
 void GcodeSuite::M114() {
193
 void GcodeSuite::M114() {
194
 
194
 
195
   #if ENABLED(M114_DETAIL)
195
   #if ENABLED(M114_DETAIL)
196
-    if (parser.seen('D')) {
196
+    if (parser.seen_test('D')) {
197
       #if DISABLED(M114_LEGACY)
197
       #if DISABLED(M114_LEGACY)
198
         planner.synchronize();
198
         planner.synchronize();
199
       #endif
199
       #endif
201
       report_current_position_detail();
201
       report_current_position_detail();
202
       return;
202
       return;
203
     }
203
     }
204
-    if (parser.seen('E')) {
204
+    if (parser.seen_test('E')) {
205
       SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS));
205
       SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS));
206
       return;
206
       return;
207
     }
207
     }
208
   #endif
208
   #endif
209
 
209
 
210
   #if ENABLED(M114_REALTIME)
210
   #if ENABLED(M114_REALTIME)
211
-    if (parser.seen('R')) { report_real_position(); return; }
211
+    if (parser.seen_test('R')) { report_real_position(); return; }
212
   #endif
212
   #endif
213
 
213
 
214
   TERN_(M114_LEGACY, planner.synchronize());
214
   TERN_(M114_LEGACY, planner.synchronize());

+ 3
- 3
Marlin/src/gcode/motion/G0_G1.cpp Просмотреть файл

49
   if (IsRunning()
49
   if (IsRunning()
50
     #if ENABLED(NO_MOTION_BEFORE_HOMING)
50
     #if ENABLED(NO_MOTION_BEFORE_HOMING)
51
       && !homing_needed_error(
51
       && !homing_needed_error(
52
-          (parser.seen('X') ? _BV(X_AXIS) : 0)
53
-        | (parser.seen('Y') ? _BV(Y_AXIS) : 0)
54
-        | (parser.seen('Z') ? _BV(Z_AXIS) : 0) )
52
+          (parser.seen_test('X') ? _BV(X_AXIS) : 0)
53
+        | (parser.seen_test('Y') ? _BV(Y_AXIS) : 0)
54
+        | (parser.seen_test('Z') ? _BV(Z_AXIS) : 0) )
55
     #endif
55
     #endif
56
   ) {
56
   ) {
57
     TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));
57
     TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING));

+ 1
- 1
Marlin/src/gcode/motion/M290.cpp Просмотреть файл

74
         const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
74
         const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2);
75
         babystep.add_mm((AxisEnum)a, offs);
75
         babystep.add_mm((AxisEnum)a, offs);
76
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
76
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
77
-          if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_probe_offset(offs);
77
+          if (a == Z_AXIS && parser.boolval('P', true)) mod_probe_offset(offs);
78
         #endif
78
         #endif
79
       }
79
       }
80
   #else
80
   #else

+ 2
- 0
Marlin/src/gcode/parser.h Просмотреть файл

408
   static inline int32_t   longval(const char c, const int32_t dval=0)    { return seenval(c) ? value_long()         : dval; }
408
   static inline int32_t   longval(const char c, const int32_t dval=0)    { return seenval(c) ? value_long()         : dval; }
409
   static inline uint32_t  ulongval(const char c, const uint32_t dval=0)  { return seenval(c) ? value_ulong()        : dval; }
409
   static inline uint32_t  ulongval(const char c, const uint32_t dval=0)  { return seenval(c) ? value_ulong()        : dval; }
410
   static inline float     linearval(const char c, const float dval=0)    { return seenval(c) ? value_linear_units() : dval; }
410
   static inline float     linearval(const char c, const float dval=0)    { return seenval(c) ? value_linear_units() : dval; }
411
+  static inline float     axisunitsval(const char c, const AxisEnum a, const float dval=0)
412
+                                                                         { return seenval(c) ? value_axis_units(a)  : dval; }
411
   static inline celsius_t celsiusval(const char c, const float dval=0)   { return seenval(c) ? value_celsius()      : dval; }
413
   static inline celsius_t celsiusval(const char c, const float dval=0)   { return seenval(c) ? value_celsius()      : dval; }
412
 
414
 
413
   #if ENABLED(MARLIN_DEV_MODE)
415
   #if ENABLED(MARLIN_DEV_MODE)

+ 1
- 1
Marlin/src/gcode/sd/M27.cpp Просмотреть файл

33
  *      OR, with 'C' get the current filename.
33
  *      OR, with 'C' get the current filename.
34
  */
34
  */
35
 void GcodeSuite::M27() {
35
 void GcodeSuite::M27() {
36
-  if (parser.seen('C')) {
36
+  if (parser.seen_test('C')) {
37
     SERIAL_ECHOPGM("Current file: ");
37
     SERIAL_ECHOPGM("Current file: ");
38
     card.printSelectedFilename();
38
     card.printSelectedFilename();
39
     return;
39
     return;

+ 1
- 1
Marlin/src/gcode/sd/M808.cpp Просмотреть файл

44
   // Allowed to go into the queue for logging purposes.
44
   // Allowed to go into the queue for logging purposes.
45
 
45
 
46
   // M808 K sent from the host to cancel all loops
46
   // M808 K sent from the host to cancel all loops
47
-  if (parser.seen('K')) repeat.cancel();
47
+  if (parser.seen_test('K')) repeat.cancel();
48
 
48
 
49
 }
49
 }
50
 
50
 

+ 1
- 1
Marlin/src/gcode/temp/M106_M107.cpp Просмотреть файл

68
       if (t > 0) return thermalManager.set_temp_fan_speed(pfan, t);
68
       if (t > 0) return thermalManager.set_temp_fan_speed(pfan, t);
69
     #endif
69
     #endif
70
 
70
 
71
-    const uint16_t dspeed = parser.seen('A') ? thermalManager.fan_speed[active_extruder] : 255;
71
+    const uint16_t dspeed = parser.seen_test('A') ? thermalManager.fan_speed[active_extruder] : 255;
72
 
72
 
73
     uint16_t speed = dspeed;
73
     uint16_t speed = dspeed;
74
 
74
 

+ 1
- 1
Marlin/src/gcode/temp/M303.cpp Просмотреть файл

47
 void GcodeSuite::M303() {
47
 void GcodeSuite::M303() {
48
 
48
 
49
   #if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
49
   #if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG)
50
-    if (parser.seen('D')) {
50
+    if (parser.seen_test('D')) {
51
       thermalManager.pid_debug_flag ^= true;
51
       thermalManager.pid_debug_flag ^= true;
52
       SERIAL_ECHO_START();
52
       SERIAL_ECHO_START();
53
       SERIAL_ECHOPGM("PID Debug ");
53
       SERIAL_ECHOPGM("PID Debug ");

Загрузка…
Отмена
Сохранить