瀏覽代碼

Fix unused var warning, apply ENABLED

Scott Lahteine 6 年之前
父節點
當前提交
07d33849b0
共有 2 個檔案被更改,包括 8 行新增6 行删除
  1. 4
    4
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  2. 4
    2
      Marlin/src/gcode/bedlevel/G26.cpp

+ 4
- 4
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

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

+ 4
- 2
Marlin/src/gcode/bedlevel/G26.cpp 查看文件

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

Loading…
取消
儲存