|
@ -263,6 +263,7 @@ static millis_t max_inactive_time = 0; |
|
|
static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L; |
|
|
static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000L; |
|
|
millis_t print_job_start_ms = 0; ///< Print job start time
|
|
|
millis_t print_job_start_ms = 0; ///< Print job start time
|
|
|
millis_t print_job_stop_ms = 0; ///< Print job stop time
|
|
|
millis_t print_job_stop_ms = 0; ///< Print job stop time
|
|
|
|
|
|
static millis_t last_command_time = 0; |
|
|
static uint8_t target_extruder; |
|
|
static uint8_t target_extruder; |
|
|
bool no_wait_for_cooling = true; |
|
|
bool no_wait_for_cooling = true; |
|
|
bool target_direction; |
|
|
bool target_direction; |
|
@ -724,8 +725,15 @@ void get_command() { |
|
|
|
|
|
|
|
|
if (drain_queued_commands_P()) return; // priority is given to non-serial commands
|
|
|
if (drain_queued_commands_P()) return; // priority is given to non-serial commands
|
|
|
|
|
|
|
|
|
while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { |
|
|
millis_t ms = millis(); |
|
|
|
|
|
|
|
|
|
|
|
if (!MYSERIAL.available() && commands_in_queue == 0 && ms - last_command_time > 1000) { |
|
|
|
|
|
SERIAL_ECHOLNPGM(MSG_WAIT); |
|
|
|
|
|
last_command_time = ms; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) { |
|
|
|
|
|
last_command_time = ms; |
|
|
serial_char = MYSERIAL.read(); |
|
|
serial_char = MYSERIAL.read(); |
|
|
|
|
|
|
|
|
if (serial_char == '\n' || serial_char == '\r' || |
|
|
if (serial_char == '\n' || serial_char == '\r' || |
|
|