MKS H43 fixup (#21267)
Co-authored-by: makerbase <4164049@qq.com> Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
@ -610,6 +610,14 @@ void GCodeQueue::get_available_commands() {
|
||||
TERN_(SDSUPPORT, get_sdcard_commands());
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the entire queue in-place. Blocks SD completion/abort until complete.
|
||||
*/
|
||||
void GCodeQueue::exhaust() {
|
||||
while (ring_buffer.occupied()) advance();
|
||||
planner.synchronize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next command in the queue, optionally log it to SD, then dispatch it
|
||||
*/
|
||||
|
@ -93,7 +93,9 @@ public:
|
||||
|
||||
inline bool full(uint8_t cmdCount=1) const { return length > (BUFSIZE - cmdCount); }
|
||||
|
||||
inline bool empty() const { return length == 0; }
|
||||
inline bool occupied() const { return length != 0; }
|
||||
|
||||
inline bool empty() const { return !occupied(); }
|
||||
|
||||
inline CommandLine& peek_next_command() { return commands[index_r]; }
|
||||
|
||||
@ -162,6 +164,11 @@ public:
|
||||
*/
|
||||
static void advance();
|
||||
|
||||
/**
|
||||
* Run the entire queue in-place
|
||||
*/
|
||||
static void exhaust();
|
||||
|
||||
/**
|
||||
* Add to the circular command queue the next command from:
|
||||
* - The command-injection queue (injected_commands_P)
|
||||
|
Reference in New Issue
Block a user