mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-02-02 07:00:42 +00:00
👷 Prefer has_blocks_queued over movesplanned
This commit is contained in:
parent
301727defc
commit
2fd1c48e1a
6 changed files with 7 additions and 6 deletions
|
@ -325,7 +325,7 @@ bool pin_is_protected(const pin_t pin) {
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
bool printer_busy() {
|
bool printer_busy() {
|
||||||
return planner.movesplanned() || printingIsActive();
|
return planner.has_blocks_queued() || printingIsActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3880,7 +3880,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
|
||||||
#elif ENABLED(LASER_MOVE_G0_OFF)
|
#elif ENABLED(LASER_MOVE_G0_OFF)
|
||||||
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
|
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
|
||||||
#elif ENABLED(LASER_MOVE_G28_OFF)
|
#elif ENABLED(LASER_MOVE_G28_OFF)
|
||||||
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
|
#error "LASER_MOVE_G28_OFF is no longer required, G0 and G28 cannot apply power."
|
||||||
#elif ENABLED(LASER_MOVE_POWER)
|
#elif ENABLED(LASER_MOVE_POWER)
|
||||||
#error "LASER_MOVE_POWER is no longer applicable."
|
#error "LASER_MOVE_POWER is no longer applicable."
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1670,7 +1670,8 @@ namespace Anycubic {
|
||||||
if (getAxisPosition_mm(Z) < 0) setAxisPosition_mm(0, Z, 8);
|
if (getAxisPosition_mm(Z) < 0) setAxisPosition_mm(0, Z, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!planner.movesplanned())return;
|
//if (!planner.has_blocks_queued()) return;
|
||||||
|
|
||||||
switch (key_value) {
|
switch (key_value) {
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1070,7 +1070,7 @@ namespace ExtUI {
|
||||||
void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
|
void injectCommands_P(PGM_P const gcode) { queue.inject_P(gcode); }
|
||||||
void injectCommands(char * const gcode) { queue.inject(gcode); }
|
void injectCommands(char * const gcode) { queue.inject(gcode); }
|
||||||
|
|
||||||
bool commandsInQueue() { return (planner.movesplanned() || queue.has_commands_queued()); }
|
bool commandsInQueue() { return (planner.has_blocks_queued() || queue.has_commands_queued()); }
|
||||||
|
|
||||||
bool isAxisPositionKnown(const axis_t axis) { return axis_is_trusted((AxisEnum)axis); }
|
bool isAxisPositionKnown(const axis_t axis) { return axis_is_trusted((AxisEnum)axis); }
|
||||||
bool isAxisPositionKnown(const extruder_t) { return axis_is_trusted(E_AXIS); }
|
bool isAxisPositionKnown(const extruder_t) { return axis_is_trusted(E_AXIS); }
|
||||||
|
|
|
@ -507,7 +507,7 @@ void _ubl_map_screen_homing() {
|
||||||
* UBL Homing before LCD map
|
* UBL Homing before LCD map
|
||||||
*/
|
*/
|
||||||
void _ubl_goto_map_screen() {
|
void _ubl_goto_map_screen() {
|
||||||
if (planner.movesplanned()) return; // The ACTION_ITEM will do nothing
|
if (planner.has_blocks_queued()) return; // The ACTION_ITEM will do nothing
|
||||||
if (!all_axes_trusted()) {
|
if (!all_axes_trusted()) {
|
||||||
set_all_unhomed();
|
set_all_unhomed();
|
||||||
queue.inject_P(G28_STR);
|
queue.inject_P(G28_STR);
|
||||||
|
|
|
@ -166,7 +166,7 @@ void FTMotion::loop() {
|
||||||
discard_planner_block_protected();
|
discard_planner_block_protected();
|
||||||
|
|
||||||
// Check if the block needs to be runout:
|
// Check if the block needs to be runout:
|
||||||
if (!batchRdy && !planner.movesplanned()) {
|
if (!batchRdy && !planner.has_blocks_queued()) {
|
||||||
runoutBlock();
|
runoutBlock();
|
||||||
makeVector(); // Do an additional makeVector call to guarantee batchRdy set this loop.
|
makeVector(); // Do an additional makeVector call to guarantee batchRdy set this loop.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue