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

Apply HAS_HOTEND_OFFSET where needed

Scott Lahteine 5 лет назад
Родитель
Сommit
d94e077901

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

@@ -230,13 +230,13 @@ void GcodeSuite::G34() {
230 230
 
231 231
     // Restore the active tool after homing
232 232
     #if HOTENDS > 1
233
-      tool_change(old_tool_index, 0,
233
+      tool_change(old_tool_index, 0, (
234 234
         #if ENABLED(PARKING_EXTRUDER)
235 235
           false // Fetch the previous toolhead
236 236
         #else
237 237
           true
238 238
         #endif
239
-      );
239
+      ));
240 240
     #endif
241 241
 
242 242
     #if HAS_LEVELING

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

@@ -418,7 +418,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
418 418
     SERIAL_EOL();
419 419
   }
420 420
 
421
-  #if HOTENDS > 1
421
+  #if HAS_HOTEND_OFFSET
422 422
     //
423 423
     // This function requires normalize_hotend_offsets() to be called
424 424
     //
@@ -642,7 +642,7 @@ void GcodeSuite::G425() {
642 642
       report_measured_backlash(m);
643 643
       report_measured_nozzle_dimensions(m);
644 644
       report_measured_positional_error(m);
645
-      #if HOTENDS > 1
645
+      #if HAS_HOTEND_OFFSET
646 646
         normalize_hotend_offsets();
647 647
         report_hotend_offsets();
648 648
       #endif

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

@@ -516,7 +516,7 @@ void GcodeSuite::process_parsed_command(
516 516
         case 217: M217(); break;                                  // M217: Set filament swap parameters
517 517
       #endif
518 518
 
519
-      #if HOTENDS > 1
519
+      #if HAS_HOTEND_OFFSET
520 520
         case 218: M218(); break;                                  // M218: Set a tool offset
521 521
       #endif
522 522
 

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

@@ -637,7 +637,7 @@ private:
637 637
     static void M217();
638 638
   #endif
639 639
 
640
-  #if HOTENDS > 1
640
+  #if HAS_HOTEND_OFFSET
641 641
     static void M218();
642 642
   #endif
643 643
 

+ 1
- 1
Marlin/src/inc/Conditionals_post.h Просмотреть файл

@@ -431,7 +431,7 @@
431 431
 /**
432 432
  * Default hotend offsets, if not defined
433 433
  */
434
-#if HOTENDS > 1
434
+#if HAS_HOTEND_OFFSET
435 435
   #ifndef HOTEND_OFFSET_X
436 436
     #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
437 437
   #endif

+ 1
- 6
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp Просмотреть файл

@@ -580,12 +580,7 @@ void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const i
580 580
 #if HAS_HEATED_BED
581 581
   void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
582 582
     const bool show_target = target && FAR(temp, target);
583
-    draw_temps(1
584
-      #if HOTENDS > 1
585
-        + 1
586
-      #endif
587
-      , temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate
588
-    );
583
+    draw_temps(HOTENDS > 1 ? 2 : 1, temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate);
589 584
     display_state.bed_show_target = show_target;
590 585
   }
591 586
 #endif

+ 2
- 2
Marlin/src/lcd/extensible_ui/ui_api.cpp Просмотреть файл

@@ -530,7 +530,7 @@ namespace ExtUI {
530 530
     }
531 531
   #endif // HAS_BED_PROBE
532 532
 
533
-  #if HOTENDS > 1
533
+  #if HAS_HOTEND_OFFSET
534 534
 
535 535
     float getNozzleOffset_mm(const axis_t axis, const extruder_t extruder) {
536 536
       if (extruder - E0 >= HOTENDS) return 0;
@@ -552,7 +552,7 @@ namespace ExtUI {
552 552
       HOTEND_LOOP() hotend_offset[axis][e] -= offs;
553 553
     }
554 554
 
555
-  #endif // HOTENDS > 1
555
+  #endif // HAS_HOTEND_OFFSET
556 556
 
557 557
   #if ENABLED(BACKLASH_GCODE)
558 558
     float getAxisBacklash_mm(const axis_t axis)       { return backlash_distance_mm[axis]; }

+ 1
- 1
Marlin/src/lcd/extensible_ui/ui_api.h Просмотреть файл

@@ -144,7 +144,7 @@ namespace ExtUI {
144 144
     void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles);
145 145
   #endif
146 146
 
147
-  #if HOTENDS > 1
147
+  #if HAS_HOTEND_OFFSET
148 148
     float getNozzleOffset_mm(const axis_t, const extruder_t);
149 149
     void setNozzleOffset_mm(const float, const axis_t, const extruder_t);
150 150
     void normalizeNozzleOffset(const axis_t axis);

+ 20
- 18
Marlin/src/lcd/menu/menu_advanced.cpp Просмотреть файл

@@ -300,24 +300,26 @@ void menu_tmc();
300 300
   #define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N); //
301 301
 #endif
302 302
 
303
-DEFINE_PIDTEMP_FUNCS(0);
304
-#if ENABLED(PID_PARAMS_PER_HOTEND)
305
-  #if HOTENDS > 1
306
-    DEFINE_PIDTEMP_FUNCS(1);
307
-    #if HOTENDS > 2
308
-      DEFINE_PIDTEMP_FUNCS(2);
309
-      #if HOTENDS > 3
310
-        DEFINE_PIDTEMP_FUNCS(3);
311
-        #if HOTENDS > 4
312
-          DEFINE_PIDTEMP_FUNCS(4);
313
-          #if HOTENDS > 5
314
-            DEFINE_PIDTEMP_FUNCS(5);
315
-          #endif // HOTENDS > 5
316
-        #endif // HOTENDS > 4
317
-      #endif // HOTENDS > 3
318
-    #endif // HOTENDS > 2
319
-  #endif // HOTENDS > 1
320
-#endif // PID_PARAMS_PER_HOTEND
303
+#if HOTENDS
304
+  DEFINE_PIDTEMP_FUNCS(0);
305
+  #if ENABLED(PID_PARAMS_PER_HOTEND)
306
+    #if HOTENDS > 1
307
+      DEFINE_PIDTEMP_FUNCS(1);
308
+      #if HOTENDS > 2
309
+        DEFINE_PIDTEMP_FUNCS(2);
310
+        #if HOTENDS > 3
311
+          DEFINE_PIDTEMP_FUNCS(3);
312
+          #if HOTENDS > 4
313
+            DEFINE_PIDTEMP_FUNCS(4);
314
+            #if HOTENDS > 5
315
+              DEFINE_PIDTEMP_FUNCS(5);
316
+            #endif // HOTENDS > 5
317
+          #endif // HOTENDS > 4
318
+        #endif // HOTENDS > 3
319
+      #endif // HOTENDS > 2
320
+    #endif // HOTENDS > 1
321
+  #endif // PID_PARAMS_PER_HOTEND
322
+#endif // HOTENDS
321 323
 
322 324
 #define SHOW_MENU_ADVANCED_TEMPERATURE ((ENABLED(AUTOTEMP) && HAS_TEMP_HOTEND) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(PID_EDIT_MENU))
323 325
 

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