Send a busy signal every 10 seconds instead of every 2

This commit is contained in:
Scott Lahteine 2016-03-25 18:36:21 -07:00
parent 26168676e7
commit cd4c3e90bc

View file

@ -2224,13 +2224,15 @@ void unknown_command_error() {
#if ENABLED(HOST_KEEPALIVE_FEATURE) #if ENABLED(HOST_KEEPALIVE_FEATURE)
/**
* Output a "busy" message at regular intervals
* while the machine is not accepting commands.
*/
void host_keepalive() { void host_keepalive() {
millis_t ms = millis(); millis_t ms = millis();
if (busy_state != NOT_BUSY) { if (busy_state != NOT_BUSY) {
if (ms < next_busy_signal_ms) return; if (ms < next_busy_signal_ms) return;
switch (busy_state) { switch (busy_state) {
case NOT_BUSY:
break;
case IN_HANDLER: case IN_HANDLER:
case IN_PROCESS: case IN_PROCESS:
SERIAL_ECHO_START; SERIAL_ECHO_START;
@ -2246,7 +2248,7 @@ void unknown_command_error() {
break; break;
} }
} }
next_busy_signal_ms = ms + 2000UL; next_busy_signal_ms = ms + 10000UL; // "busy: ..." message every 10s
} }
#endif //HOST_KEEPALIVE_FEATURE #endif //HOST_KEEPALIVE_FEATURE