Also call clear_command_queue for lcd_sdcard_stop
This commit is contained in:
parent
6277395e1e
commit
064efb20e0
@ -254,6 +254,7 @@ inline bool IsStopped() { return !Running; }
|
|||||||
bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); //put a single ASCII command at the end of the current buffer or return false when it is full
|
bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); //put a single ASCII command at the end of the current buffer or return false when it is full
|
||||||
void enqueue_and_echo_command_now(const char* cmd); // enqueue now, only return when the command has been enqueued
|
void enqueue_and_echo_command_now(const char* cmd); // enqueue now, only return when the command has been enqueued
|
||||||
void enqueue_and_echo_commands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
|
void enqueue_and_echo_commands_P(const char* cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
|
||||||
|
void clear_command_queue();
|
||||||
|
|
||||||
void clamp_to_software_endstops(float target[3]);
|
void clamp_to_software_endstops(float target[3]);
|
||||||
|
|
||||||
|
@ -613,6 +613,11 @@ void enqueue_and_echo_commands_P(const char* pgcode) {
|
|||||||
drain_queued_commands_P(); // first command executed asap (when possible)
|
drain_queued_commands_P(); // first command executed asap (when possible)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear_command_queue() {
|
||||||
|
cmd_queue_index_r = cmd_queue_index_w;
|
||||||
|
commands_in_queue = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Once a new command is in the ring buffer, call this to commit it
|
* Once a new command is in the ring buffer, call this to commit it
|
||||||
*/
|
*/
|
||||||
|
@ -483,6 +483,7 @@ inline void line_to_current(AxisEnum axis) {
|
|||||||
static void lcd_sdcard_stop() {
|
static void lcd_sdcard_stop() {
|
||||||
stepper.quick_stop();
|
stepper.quick_stop();
|
||||||
set_current_position_from_planner();
|
set_current_position_from_planner();
|
||||||
|
clear_command_queue();
|
||||||
card.sdprinting = false;
|
card.sdprinting = false;
|
||||||
card.closefile();
|
card.closefile();
|
||||||
print_job_timer.stop();
|
print_job_timer.stop();
|
||||||
|
Loading…
Reference in New Issue
Block a user