Browse Source

Removed the DISABLE from HOST_KEEPALIVE_FEATURE option

João Brázio 9 years ago
parent
commit
ac7f634956
No account linked to committer's email address
3 changed files with 7 additions and 9 deletions
  1. 3
    3
      Marlin/Conditionals.h
  2. 3
    5
      Marlin/Configuration.h
  3. 1
    1
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Conditionals.h View File

395
   #endif
395
   #endif
396
 
396
 
397
   /**
397
   /**
398
-   * Avoid double-negatives for enabling features
398
+   * Host keep alive
399
    */
399
    */
400
-  #if DISABLED(DISABLE_HOST_KEEPALIVE)
401
-    #define HOST_KEEPALIVE_FEATURE
400
+  #ifndef HOST_KEEPALIVE_INTERVAL
401
+    #define HOST_KEEPALIVE_INTERVAL 2
402
   #endif
402
   #endif
403
 
403
 
404
   /**
404
   /**

+ 3
- 5
Marlin/Configuration.h View File

733
 //
733
 //
734
 // Host Keepalive
734
 // Host Keepalive
735
 //
735
 //
736
-// By default Marlin will send a busy status message to the host
736
+// When enabled Marlin will send a busy status message to the host
737
 // every couple of seconds when it can't accept commands.
737
 // every couple of seconds when it can't accept commands.
738
 //
738
 //
739
-//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages.
740
-#if DISABLED(DISABLE_HOST_KEEPALIVE)
741
-  #define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
742
-#endif
739
+#define HOST_KEEPALIVE_FEATURE    // Disable this if your host doesn't like keepalive messages
740
+#define HOST_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
743
 
741
 
744
 //
742
 //
745
 // M100 Free Memory Watcher
743
 // M100 Free Memory Watcher

+ 1
- 1
Marlin/Marlin_main.cpp View File

488
 
488
 
489
   static MarlinBusyState busy_state = NOT_BUSY;
489
   static MarlinBusyState busy_state = NOT_BUSY;
490
   static millis_t next_busy_signal_ms = 0;
490
   static millis_t next_busy_signal_ms = 0;
491
-  uint8_t host_keepalive_interval = DEFAULT_KEEPALIVE_INTERVAL;
491
+  uint8_t host_keepalive_interval = HOST_KEEPALIVE_INTERVAL;
492
   #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
492
   #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
493
 #else
493
 #else
494
   #define host_keepalive() ;
494
   #define host_keepalive() ;

Loading…
Cancel
Save