Browse Source

Send a Busy signal to hosts during long processes, wait for input, etc

If Marlin is blocking the serial input or command queue for any length
of time (for example more than 2 seconds), it needs to send a message
to serial out to inform the host that it is busy. Marlin should only
send these messages out when busy, and preferably not when trying to
print formatted output.
Scott Lahteine 8 years ago
parent
commit
7ec7bb31c4

+ 7
- 0
Marlin/Conditionals.h View File

315
   #endif
315
   #endif
316
 
316
 
317
   /**
317
   /**
318
+   * Avoid double-negatives for enabling features
319
+   */
320
+  #if DISABLED(DISABLE_HOST_KEEPALIVE)
321
+    #define HOST_KEEPALIVE_FEATURE
322
+  #endif
323
+
324
+  /**
318
    * MAX_STEP_FREQUENCY differs for TOSHIBA
325
    * MAX_STEP_FREQUENCY differs for TOSHIBA
319
    */
326
    */
320
   #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
327
   #if ENABLED(CONFIG_STEPPERS_TOSHIBA)

+ 8
- 0
Marlin/Configuration.h View File

647
 #endif
647
 #endif
648
 
648
 
649
 //
649
 //
650
+// Host Keepalive
651
+//
652
+// By default Marlin will send a busy status message to the host
653
+// every 2 seconds when it can't accept commands.
654
+//
655
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
656
+
657
+//
650
 // M100 Free Memory Watcher
658
 // M100 Free Memory Watcher
651
 //
659
 //
652
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
660
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 72
- 3
Marlin/Marlin_main.cpp View File

426
   int lpq_len = 20;
426
   int lpq_len = 20;
427
 #endif
427
 #endif
428
 
428
 
429
+#if ENABLED(HOST_KEEPALIVE_FEATURE)
430
+
431
+  // States for managing Marlin and host communication
432
+  // Marlin sends messages if blocked or busy
433
+  enum MarlinBusyState {
434
+    NOT_BUSY,           // Not in a handler
435
+    IN_HANDLER,         // Processing a GCode
436
+    IN_PROCESS,         // Known to be blocking command input (as in G29)
437
+    PAUSED_FOR_USER,    // Blocking pending any input
438
+    PAUSED_FOR_INPUT    // Blocking pending text input (concept)
439
+  };
440
+
441
+  static MarlinBusyState busy_state = NOT_BUSY;
442
+  static millis_t next_busy_signal_ms = -1;
443
+  #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
444
+#else
445
+  #define host_keepalive() ;
446
+  #define KEEPALIVE_STATE(n) ;
447
+#endif // HOST_KEEPALIVE_FEATURE
448
+
429
 //===========================================================================
449
 //===========================================================================
430
 //================================ Functions ================================
450
 //================================ Functions ================================
431
 //===========================================================================
451
 //===========================================================================
2130
   SERIAL_ECHOPGM("\"\n");
2150
   SERIAL_ECHOPGM("\"\n");
2131
 }
2151
 }
2132
 
2152
 
2153
+#if ENABLED(HOST_KEEPALIVE_FEATURE)
2154
+
2155
+  void host_keepalive() {
2156
+    millis_t ms = millis();
2157
+    if (busy_state != NOT_BUSY) {
2158
+      if (ms < next_busy_signal_ms) return;
2159
+      switch (busy_state) {
2160
+        case NOT_BUSY:
2161
+          break;
2162
+        case IN_HANDLER:
2163
+        case IN_PROCESS:
2164
+          SERIAL_ECHO_START;
2165
+          SERIAL_ECHOLNPGM(MSG_BUSY_PROCESSING);
2166
+          break;
2167
+        case PAUSED_FOR_USER:
2168
+          SERIAL_ECHO_START;
2169
+          SERIAL_ECHOLNPGM(MSG_BUSY_PAUSED_FOR_USER);
2170
+          break;
2171
+        case PAUSED_FOR_INPUT:
2172
+          SERIAL_ECHO_START;
2173
+          SERIAL_ECHOLNPGM(MSG_BUSY_PAUSED_FOR_INPUT);
2174
+          break;
2175
+      }
2176
+    }
2177
+    next_busy_signal_ms = ms + 2000UL;
2178
+  }
2179
+
2180
+#endif //HOST_KEEPALIVE_FEATURE
2181
+
2133
 /**
2182
 /**
2134
  * G0, G1: Coordinated movement of X Y Z E axes
2183
  * G0, G1: Coordinated movement of X Y Z E axes
2135
  */
2184
  */
3219
       st_synchronize();
3268
       st_synchronize();
3220
     #endif
3269
     #endif
3221
 
3270
 
3271
+    KEEPALIVE_STATE(IN_HANDLER);
3272
+
3222
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3273
     #if ENABLED(DEBUG_LEVELING_FEATURE)
3223
       if (marlin_debug_flags & DEBUG_LEVELING) {
3274
       if (marlin_debug_flags & DEBUG_LEVELING) {
3224
         SERIAL_ECHOLNPGM("<<< gcode_G29");
3275
         SERIAL_ECHOLNPGM("<<< gcode_G29");
3325
     refresh_cmd_timeout();
3376
     refresh_cmd_timeout();
3326
     if (codenum > 0) {
3377
     if (codenum > 0) {
3327
       codenum += previous_cmd_ms;  // wait until this time for a click
3378
       codenum += previous_cmd_ms;  // wait until this time for a click
3379
+      KEEPALIVE_STATE(PAUSED_FOR_USER);
3328
       while (millis() < codenum && !lcd_clicked()) idle();
3380
       while (millis() < codenum && !lcd_clicked()) idle();
3381
+      KEEPALIVE_STATE(IN_HANDLER);
3329
       lcd_ignore_click(false);
3382
       lcd_ignore_click(false);
3330
     }
3383
     }
3331
     else {
3384
     else {
3332
       if (!lcd_detected()) return;
3385
       if (!lcd_detected()) return;
3386
+      KEEPALIVE_STATE(PAUSED_FOR_USER);
3333
       while (!lcd_clicked()) idle();
3387
       while (!lcd_clicked()) idle();
3388
+      KEEPALIVE_STATE(IN_HANDLER);
3334
     }
3389
     }
3335
     if (IS_SD_PRINTING)
3390
     if (IS_SD_PRINTING)
3336
       LCD_MESSAGEPGM(MSG_RESUMING);
3391
       LCD_MESSAGEPGM(MSG_RESUMING);
4963
 
5018
 
4964
   if (e >=0 && e < EXTRUDERS)
5019
   if (e >=0 && e < EXTRUDERS)
4965
     target_extruder = e;
5020
     target_extruder = e;
5021
+
5022
+  KEEPALIVE_STATE(NOT_BUSY);
4966
   PID_autotune(temp, e, c);
5023
   PID_autotune(temp, e, c);
4967
 }
5024
 }
4968
 
5025
 
5334
 
5391
 
5335
 #if ENABLED(FILAMENTCHANGEENABLE)
5392
 #if ENABLED(FILAMENTCHANGEENABLE)
5336
 
5393
 
5394
+  inline void idle2() {
5395
+    manage_heater();
5396
+    manage_inactivity(true);
5397
+    host_keepalive();
5398
+    lcd_update();
5399
+  }
5400
+
5337
   /**
5401
   /**
5338
    * M600: Pause for filament change
5402
    * M600: Pause for filament change
5339
    *
5403
    *
5412
     delay(100);
5476
     delay(100);
5413
     LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
5477
     LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
5414
     millis_t next_tick = 0;
5478
     millis_t next_tick = 0;
5479
+    KEEPALIVE_STATE(WAIT_FOR_USER);
5415
     while (!lcd_clicked()) {
5480
     while (!lcd_clicked()) {
5416
       #if DISABLED(AUTO_FILAMENT_CHANGE)
5481
       #if DISABLED(AUTO_FILAMENT_CHANGE)
5417
         millis_t ms = millis();
5482
         millis_t ms = millis();
5419
           lcd_quick_feedback();
5484
           lcd_quick_feedback();
5420
           next_tick = ms + 2500; // feedback every 2.5s while waiting
5485
           next_tick = ms + 2500; // feedback every 2.5s while waiting
5421
         }
5486
         }
5422
-        manage_heater();
5423
-        manage_inactivity(true);
5424
-        lcd_update();
5487
+        idle2();
5425
       #else
5488
       #else
5426
         current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
5489
         current_position[E_AXIS] += AUTO_FILAMENT_CHANGE_LENGTH;
5427
         destination[E_AXIS] = current_position[E_AXIS];
5490
         destination[E_AXIS] = current_position[E_AXIS];
5429
         st_synchronize();
5492
         st_synchronize();
5430
       #endif
5493
       #endif
5431
     } // while(!lcd_clicked)
5494
     } // while(!lcd_clicked)
5495
+    KEEPALIVE_STATE(IN_HANDLER);
5432
     lcd_quick_feedback(); // click sound feedback
5496
     lcd_quick_feedback(); // click sound feedback
5433
 
5497
 
5434
     #if ENABLED(AUTO_FILAMENT_CHANGE)
5498
     #if ENABLED(AUTO_FILAMENT_CHANGE)
5765
   seen_pointer = current_command;
5829
   seen_pointer = current_command;
5766
   codenum = code_value_short();
5830
   codenum = code_value_short();
5767
 
5831
 
5832
+  KEEPALIVE_STATE(IN_HANDLER);
5833
+
5768
   // Handle a known G, M, or T
5834
   // Handle a known G, M, or T
5769
   switch (command_code) {
5835
   switch (command_code) {
5770
     case 'G': switch (codenum) {
5836
     case 'G': switch (codenum) {
6286
     default: code_is_good = false;
6352
     default: code_is_good = false;
6287
   }
6353
   }
6288
 
6354
 
6355
+  KEEPALIVE_STATE(NOT_BUSY);
6356
+
6289
 ExitUnknownCommand:
6357
 ExitUnknownCommand:
6290
 
6358
 
6291
   // Still unknown command? Throw an error
6359
   // Still unknown command? Throw an error
6975
 void idle() {
7043
 void idle() {
6976
   manage_heater();
7044
   manage_heater();
6977
   manage_inactivity();
7045
   manage_inactivity();
7046
+  host_keepalive();
6978
   lcd_update();
7047
   lcd_update();
6979
 }
7048
 }
6980
 
7049
 

+ 8
- 0
Marlin/example_configurations/Felix/Configuration.h View File

630
 #endif
630
 #endif
631
 
631
 
632
 //
632
 //
633
+// Host Keepalive
634
+//
635
+// By default Marlin will send a busy status message to the host
636
+// every 2 seconds when it can't accept commands.
637
+//
638
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
639
+
640
+//
633
 // M100 Free Memory Watcher
641
 // M100 Free Memory Watcher
634
 //
642
 //
635
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
643
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

627
 #endif
627
 #endif
628
 
628
 
629
 //
629
 //
630
+// Host Keepalive
631
+//
632
+// By default Marlin will send a busy status message to the host
633
+// every 2 seconds when it can't accept commands.
634
+//
635
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
636
+
637
+//
630
 // M100 Free Memory Watcher
638
 // M100 Free Memory Watcher
631
 //
639
 //
632
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
640
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/Hephestos/Configuration.h View File

639
 #endif
639
 #endif
640
 
640
 
641
 //
641
 //
642
+// Host Keepalive
643
+//
644
+// By default Marlin will send a busy status message to the host
645
+// every 2 seconds when it can't accept commands.
646
+//
647
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
648
+
649
+//
642
 // M100 Free Memory Watcher
650
 // M100 Free Memory Watcher
643
 //
651
 //
644
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
652
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h View File

642
 #endif
642
 #endif
643
 
643
 
644
 //
644
 //
645
+// Host Keepalive
646
+//
647
+// By default Marlin will send a busy status message to the host
648
+// every 2 seconds when it can't accept commands.
649
+//
650
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
651
+
652
+//
645
 // M100 Free Memory Watcher
653
 // M100 Free Memory Watcher
646
 //
654
 //
647
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
655
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/K8200/Configuration.h View File

662
 #endif
662
 #endif
663
 
663
 
664
 //
664
 //
665
+// Host Keepalive
666
+//
667
+// By default Marlin will send a busy status message to the host
668
+// every 2 seconds when it can't accept commands.
669
+//
670
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
671
+
672
+//
665
 // M100 Free Memory Watcher
673
 // M100 Free Memory Watcher
666
 //
674
 //
667
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
675
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

647
 #endif
647
 #endif
648
 
648
 
649
 //
649
 //
650
+// Host Keepalive
651
+//
652
+// By default Marlin will send a busy status message to the host
653
+// every 2 seconds when it can't accept commands.
654
+//
655
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
656
+
657
+//
650
 // M100 Free Memory Watcher
658
 // M100 Free Memory Watcher
651
 //
659
 //
652
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
660
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/RigidBot/Configuration.h View File

642
 #endif
642
 #endif
643
 
643
 
644
 //
644
 //
645
+// Host Keepalive
646
+//
647
+// By default Marlin will send a busy status message to the host
648
+// every 2 seconds when it can't accept commands.
649
+//
650
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
651
+
652
+//
645
 // M100 Free Memory Watcher
653
 // M100 Free Memory Watcher
646
 //
654
 //
647
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
655
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/SCARA/Configuration.h View File

655
 #endif
655
 #endif
656
 
656
 
657
 //
657
 //
658
+// Host Keepalive
659
+//
660
+// By default Marlin will send a busy status message to the host
661
+// every 2 seconds when it can't accept commands.
662
+//
663
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
664
+
665
+//
658
 // M100 Free Memory Watcher
666
 // M100 Free Memory Watcher
659
 //
667
 //
660
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
668
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/TAZ4/Configuration.h View File

667
 #endif
667
 #endif
668
 
668
 
669
 //
669
 //
670
+// Host Keepalive
671
+//
672
+// By default Marlin will send a busy status message to the host
673
+// every 2 seconds when it can't accept commands.
674
+//
675
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
676
+
677
+//
670
 // M100 Free Memory Watcher
678
 // M100 Free Memory Watcher
671
 //
679
 //
672
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
680
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/WITBOX/Configuration.h View File

639
 #endif
639
 #endif
640
 
640
 
641
 //
641
 //
642
+// Host Keepalive
643
+//
644
+// By default Marlin will send a busy status message to the host
645
+// every 2 seconds when it can't accept commands.
646
+//
647
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
648
+
649
+//
642
 // M100 Free Memory Watcher
650
 // M100 Free Memory Watcher
643
 //
651
 //
644
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
652
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

647
 #endif
647
 #endif
648
 
648
 
649
 //
649
 //
650
+// Host Keepalive
651
+//
652
+// By default Marlin will send a busy status message to the host
653
+// every 2 seconds when it can't accept commands.
654
+//
655
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
656
+
657
+//
650
 // M100 Free Memory Watcher
658
 // M100 Free Memory Watcher
651
 //
659
 //
652
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
660
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

769
 #endif
769
 #endif
770
 
770
 
771
 //
771
 //
772
+// Host Keepalive
773
+//
774
+// By default Marlin will send a busy status message to the host
775
+// every 2 seconds when it can't accept commands.
776
+//
777
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
778
+
779
+//
772
 // M100 Free Memory Watcher
780
 // M100 Free Memory Watcher
773
 //
781
 //
774
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
782
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/delta/generic/Configuration.h View File

769
 #endif
769
 #endif
770
 
770
 
771
 //
771
 //
772
+// Host Keepalive
773
+//
774
+// By default Marlin will send a busy status message to the host
775
+// every 2 seconds when it can't accept commands.
776
+//
777
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
778
+
779
+//
772
 // M100 Free Memory Watcher
780
 // M100 Free Memory Watcher
773
 //
781
 //
774
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
782
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

773
 #endif
773
 #endif
774
 
774
 
775
 //
775
 //
776
+// Host Keepalive
777
+//
778
+// By default Marlin will send a busy status message to the host
779
+// every 2 seconds when it can't accept commands.
780
+//
781
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
782
+
783
+//
776
 // M100 Free Memory Watcher
784
 // M100 Free Memory Watcher
777
 //
785
 //
778
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
786
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

764
 #endif
764
 #endif
765
 
765
 
766
 //
766
 //
767
+// Host Keepalive
768
+//
769
+// By default Marlin will send a busy status message to the host
770
+// every 2 seconds when it can't accept commands.
771
+//
772
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
773
+
774
+//
767
 // M100 Free Memory Watcher
775
 // M100 Free Memory Watcher
768
 //
776
 //
769
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
777
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

683
 #endif
683
 #endif
684
 
684
 
685
 //
685
 //
686
+// Host Keepalive
687
+//
688
+// By default Marlin will send a busy status message to the host
689
+// every 2 seconds when it can't accept commands.
690
+//
691
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
692
+
693
+//
686
 // M100 Free Memory Watcher
694
 // M100 Free Memory Watcher
687
 //
695
 //
688
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
696
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/makibox/Configuration.h View File

650
 #endif
650
 #endif
651
 
651
 
652
 //
652
 //
653
+// Host Keepalive
654
+//
655
+// By default Marlin will send a busy status message to the host
656
+// every 2 seconds when it can't accept commands.
657
+//
658
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
659
+
660
+//
653
 // M100 Free Memory Watcher
661
 // M100 Free Memory Watcher
654
 //
662
 //
655
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
663
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 8
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

641
 #endif
641
 #endif
642
 
642
 
643
 //
643
 //
644
+// Host Keepalive
645
+//
646
+// By default Marlin will send a busy status message to the host
647
+// every 2 seconds when it can't accept commands.
648
+//
649
+//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
650
+
651
+//
644
 // M100 Free Memory Watcher
652
 // M100 Free Memory Watcher
645
 //
653
 //
646
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
654
 //#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose

+ 3
- 0
Marlin/language.h View File

124
 #define MSG_COUNT_A                         " Count A: "
124
 #define MSG_COUNT_A                         " Count A: "
125
 #define MSG_ERR_KILLED                      "Printer halted. kill() called!"
125
 #define MSG_ERR_KILLED                      "Printer halted. kill() called!"
126
 #define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
126
 #define MSG_ERR_STOPPED                     "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
127
+#define MSG_BUSY_PROCESSING                 "busy: processing"
128
+#define MSG_BUSY_PAUSED_FOR_USER            "busy: paused for user"
129
+#define MSG_BUSY_PAUSED_FOR_INPUT           "busy: paused for input"
127
 #define MSG_RESEND                          "Resend: "
130
 #define MSG_RESEND                          "Resend: "
128
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
131
 #define MSG_UNKNOWN_COMMAND                 "Unknown command: \""
129
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "
132
 #define MSG_ACTIVE_EXTRUDER                 "Active Extruder: "

Loading…
Cancel
Save