From ac7f634956254f87b45cdb75be782b23b8865a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Br=C3=A1zio?= Date: Tue, 10 May 2016 14:03:34 +0100 Subject: [PATCH] Removed the DISABLE from HOST_KEEPALIVE_FEATURE option --- Marlin/Conditionals.h | 6 +++--- Marlin/Configuration.h | 8 +++----- Marlin/Marlin_main.cpp | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 41dcec76c..34c58ca21 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -395,10 +395,10 @@ #endif /** - * Avoid double-negatives for enabling features + * Host keep alive */ - #if DISABLED(DISABLE_HOST_KEEPALIVE) - #define HOST_KEEPALIVE_FEATURE + #ifndef HOST_KEEPALIVE_INTERVAL + #define HOST_KEEPALIVE_INTERVAL 2 #endif /** diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 3b164a4f6..157f7a5ac 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -733,13 +733,11 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // // Host Keepalive // -// By default Marlin will send a busy status message to the host +// When enabled Marlin will send a busy status message to the host // every couple of seconds when it can't accept commands. // -//#define DISABLE_HOST_KEEPALIVE // Enable this option if your host doesn't like keepalive messages. -#if DISABLED(DISABLE_HOST_KEEPALIVE) - #define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. -#endif +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define HOST_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. // // M100 Free Memory Watcher diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 45907f355..6ce0ce6b6 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -488,7 +488,7 @@ static bool send_ok[BUFSIZE]; static MarlinBusyState busy_state = NOT_BUSY; static millis_t next_busy_signal_ms = 0; - uint8_t host_keepalive_interval = DEFAULT_KEEPALIVE_INTERVAL; + uint8_t host_keepalive_interval = HOST_KEEPALIVE_INTERVAL; #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0) #else #define host_keepalive() ;