Browse Source

Merge pull request #3252 from thinkyhead/rc_keepalive_less

Host Keepalive: Reduce frequency of "busy" messages
Scott Lahteine 9 years ago
parent
commit
67fabb6044
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      Marlin/Marlin_main.cpp

+ 5
- 3
Marlin/Marlin_main.cpp View File

2224
 
2224
 
2225
 #if ENABLED(HOST_KEEPALIVE_FEATURE)
2225
 #if ENABLED(HOST_KEEPALIVE_FEATURE)
2226
 
2226
 
2227
+  /**
2228
+   * Output a "busy" message at regular intervals
2229
+   * while the machine is not accepting commands.
2230
+   */
2227
   void host_keepalive() {
2231
   void host_keepalive() {
2228
     millis_t ms = millis();
2232
     millis_t ms = millis();
2229
     if (busy_state != NOT_BUSY) {
2233
     if (busy_state != NOT_BUSY) {
2230
       if (ms < next_busy_signal_ms) return;
2234
       if (ms < next_busy_signal_ms) return;
2231
       switch (busy_state) {
2235
       switch (busy_state) {
2232
-        case NOT_BUSY:
2233
-          break;
2234
         case IN_HANDLER:
2236
         case IN_HANDLER:
2235
         case IN_PROCESS:
2237
         case IN_PROCESS:
2236
           SERIAL_ECHO_START;
2238
           SERIAL_ECHO_START;
2246
           break;
2248
           break;
2247
       }
2249
       }
2248
     }
2250
     }
2249
-    next_busy_signal_ms = ms + 2000UL;
2251
+    next_busy_signal_ms = ms + 10000UL; // "busy: ..." message every 10s
2250
   }
2252
   }
2251
 
2253
 
2252
 #endif //HOST_KEEPALIVE_FEATURE
2254
 #endif //HOST_KEEPALIVE_FEATURE

Loading…
Cancel
Save