Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#7253 from thinkyhead/bf_busy_protocol
Browse files Browse the repository at this point in the history
"Keepalive" is now "Busy protocol"
  • Loading branch information
thinkyhead authored Jul 6, 2017
2 parents 504d263 + fc9ce65 commit 2cb308f
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 6 deletions.
1 change: 1 addition & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
24 changes: 18 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7302,7 +7302,9 @@ inline void gcode_M109() {
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;

KEEPALIVE_STATE(NOT_BUSY);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(NOT_BUSY);
#endif

#if ENABLED(PRINTER_EVENT_LEDS)
const float start_temp = thermalManager.degHotend(target_extruder);
Expand Down Expand Up @@ -7385,7 +7387,9 @@ inline void gcode_M109() {
#endif
}

KEEPALIVE_STATE(IN_HANDLER);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
}

#if HAS_TEMP_BED
Expand Down Expand Up @@ -7429,7 +7433,9 @@ inline void gcode_M109() {
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;

KEEPALIVE_STATE(NOT_BUSY);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(NOT_BUSY);
#endif

target_extruder = active_extruder; // for print_heaterstates

Expand Down Expand Up @@ -7504,7 +7510,9 @@ inline void gcode_M109() {
} while (wait_for_heatup && TEMP_BED_CONDITIONS);

if (wait_for_heatup) LCD_MESSAGEPGM(MSG_BED_DONE);
KEEPALIVE_STATE(IN_HANDLER);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
}

#endif // HAS_TEMP_BED
Expand Down Expand Up @@ -8818,11 +8826,15 @@ inline void gcode_M303() {
if (WITHIN(e, 0, HOTENDS - 1))
target_extruder = e;

KEEPALIVE_STATE(NOT_BUSY); // don't send "busy: processing" messages during autotune output
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(NOT_BUSY);
#endif

thermalManager.PID_autotune(temp, e, c, u);

KEEPALIVE_STATE(IN_HANDLER);
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
#else
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_M303_DISABLED);
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Anet/A6/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/CL-260/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Cartesio/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Felix/DUAL/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@
//
//#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 10 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/K8400/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/M150/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/TinyBoy2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 5 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 5 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@
//
//#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/makibox/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down
1 change: 1 addition & 0 deletions Marlin/example_configurations/wt150/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@
//
#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating

//
// M100 Free Memory Watcher
Expand Down

0 comments on commit 2cb308f

Please sign in to comment.