Browse Source

Patch idle forevermore

Scott Lahteine 9 years ago
parent
commit
963a92ceda
2 changed files with 16 additions and 11 deletions
  1. 5
    1
      Marlin/Marlin.h
  2. 11
    10
      Marlin/Marlin_main.cpp

+ 5
- 1
Marlin/Marlin.h View File

103
 
103
 
104
 void get_command();
104
 void get_command();
105
 
105
 
106
-void idle(); // the standard idle routine calls manage_inactivity(false)
106
+void idle(
107
+  #if ENABLED(FILAMENTCHANGEENABLE)
108
+    bool no_stepper_sleep=false  // pass true to keep steppers from disabling on timeout
109
+  #endif
110
+);
107
 
111
 
108
 void manage_inactivity(bool ignore_stepper_queue = false);
112
 void manage_inactivity(bool ignore_stepper_queue = false);
109
 
113
 

+ 11
- 10
Marlin/Marlin_main.cpp View File

5391
 
5391
 
5392
 #if ENABLED(FILAMENTCHANGEENABLE)
5392
 #if ENABLED(FILAMENTCHANGEENABLE)
5393
 
5393
 
5394
-  inline void idle2() {
5395
-    manage_heater();
5396
-    manage_inactivity(true);
5397
-    host_keepalive();
5398
-    lcd_update();
5399
-  }
5400
-
5401
   /**
5394
   /**
5402
    * M600: Pause for filament change
5395
    * M600: Pause for filament change
5403
    *
5396
    *
5484
           lcd_quick_feedback();
5477
           lcd_quick_feedback();
5485
           next_tick = ms + 2500; // feedback every 2.5s while waiting
5478
           next_tick = ms + 2500; // feedback every 2.5s while waiting
5486
         }
5479
         }
5487
-        idle2();
5480
+        idle(true);
5488
       #else
5481
       #else
5489
         current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
5482
         current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
5490
         destination[E_AXIS] = current_position[E_AXIS];
5483
         destination[E_AXIS] = current_position[E_AXIS];
7040
 /**
7033
 /**
7041
  * Standard idle routine keeps the machine alive
7034
  * Standard idle routine keeps the machine alive
7042
  */
7035
  */
7043
-void idle() {
7036
+void idle(
7037
+  #if ENABLED(FILAMENTCHANGEENABLE)
7038
+    bool no_stepper_sleep/*=false*/
7039
+  #endif
7040
+) {
7044
   manage_heater();
7041
   manage_heater();
7045
-  manage_inactivity();
7042
+  manage_inactivity(
7043
+    #if ENABLED(FILAMENTCHANGEENABLE)
7044
+      no_stepper_sleep
7045
+    #endif
7046
+  );
7046
   host_keepalive();
7047
   host_keepalive();
7047
   lcd_update();
7048
   lcd_update();
7048
 }
7049
 }

Loading…
Cancel
Save