Pārlūkot izejas kodu

Fix unused var warning, apply ENABLED

Scott Lahteine 6 gadus atpakaļ
vecāks
revīzija
07d33849b0

+ 4
- 4
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp Parādīt failu

@@ -1027,12 +1027,12 @@
1027 1027
 
1028 1028
   static uint8_t ubl_state_at_invocation = 0;
1029 1029
 
1030
-  #ifdef UBL_DEVEL_DEBUGGING
1030
+  #if ENABLED(UBL_DEVEL_DEBUGGING)
1031 1031
     static uint8_t ubl_state_recursion_chk = 0;
1032 1032
   #endif
1033 1033
 
1034 1034
   void unified_bed_leveling::save_ubl_active_state_and_disable() {
1035
-    #ifdef UBL_DEVEL_DEBUGGING
1035
+    #if ENABLED(UBL_DEVEL_DEBUGGING)
1036 1036
       ubl_state_recursion_chk++;
1037 1037
       if (ubl_state_recursion_chk != 1) {
1038 1038
         SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
@@ -1048,7 +1048,7 @@
1048 1048
   }
1049 1049
 
1050 1050
   void unified_bed_leveling::restore_ubl_active_state_and_leave() {
1051
-    #ifdef UBL_DEVEL_DEBUGGING
1051
+    #if ENABLED(UBL_DEVEL_DEBUGGING)
1052 1052
       if (--ubl_state_recursion_chk) {
1053 1053
         SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
1054 1054
         #if ENABLED(NEWPANEL)
@@ -1132,7 +1132,7 @@
1132 1132
     SERIAL_EOL();
1133 1133
     safe_delay(50);
1134 1134
 
1135
-    #ifdef UBL_DEVEL_DEBUGGING
1135
+    #if ENABLED(UBL_DEVEL_DEBUGGING)
1136 1136
       SERIAL_PROTOCOLLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation);
1137 1137
       SERIAL_EOL();
1138 1138
       SERIAL_PROTOCOLLNPAIR("ubl_state_recursion_chk :", ubl_state_recursion_chk);

+ 4
- 2
Marlin/src/gcode/bedlevel/G26.cpp Parādīt failu

@@ -475,7 +475,9 @@ inline bool turn_on_heaters() {
475 475
 inline bool prime_nozzle() {
476 476
 
477 477
   #if ENABLED(ULTIPANEL)
478
-    float Total_Prime = 0.0;
478
+    #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
479
+      float Total_Prime = 0.0;
480
+    #endif
479 481
 
480 482
     if (g26_prime_flag == -1) {  // The user wants to control how much filament gets purged
481 483
 
@@ -490,7 +492,7 @@ inline bool prime_nozzle() {
490 492
       while (!is_lcd_clicked()) {
491 493
         lcd_chirp();
492 494
         destination[E_AXIS] += 0.25;
493
-        #ifdef PREVENT_LENGTHY_EXTRUDE
495
+        #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
494 496
           Total_Prime += 0.25;
495 497
           if (Total_Prime >= EXTRUDE_MAXLENGTH) return G26_ERR;
496 498
         #endif

Notiek ielāde…
Atcelt
Saglabāt