浏览代码

Removed the DISABLE from HOST_KEEPALIVE_FEATURE option

João Brázio 9 年前
父节点
当前提交
ac7f634956
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 7 次插入9 次删除
  1. 3
    3
      Marlin/Conditionals.h
  2. 3
    5
      Marlin/Configuration.h
  3. 1
    1
      Marlin/Marlin_main.cpp

+ 3
- 3
Marlin/Conditionals.h 查看文件

@@ -395,10 +395,10 @@
395 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 402
   #endif
403 403
 
404 404
   /**

+ 3
- 5
Marlin/Configuration.h 查看文件

@@ -733,13 +733,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
733 733
 //
734 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 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 743
 // M100 Free Memory Watcher

+ 1
- 1
Marlin/Marlin_main.cpp 查看文件

@@ -488,7 +488,7 @@ static bool send_ok[BUFSIZE];
488 488
 
489 489
   static MarlinBusyState busy_state = NOT_BUSY;
490 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 492
   #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
493 493
 #else
494 494
   #define host_keepalive() ;

正在加载...
取消
保存