0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-22 17:52:57 +00:00

👷 Prefer has_blocks_queued over movesplanned

This commit is contained in:
Scott Lahteine 2024-08-19 14:26:44 -05:00
parent 301727defc
commit 2fd1c48e1a
6 changed files with 7 additions and 6 deletions

View file

@ -325,7 +325,7 @@ bool pin_is_protected(const pin_t pin) {
#pragma GCC diagnostic pop
bool printer_busy() {
return planner.movesplanned() || printingIsActive();
return planner.has_blocks_queued() || printingIsActive();
}
/**

View file

@ -3880,7 +3880,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#elif ENABLED(LASER_MOVE_G0_OFF)
#error "LASER_MOVE_G0_OFF is no longer required, G0 and G28 cannot apply power."
#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)
#error "LASER_MOVE_POWER is no longer applicable."
#endif

View file

@ -1670,7 +1670,8 @@ namespace Anycubic {
if (getAxisPosition_mm(Z) < 0) setAxisPosition_mm(0, Z, 8);
}
// if (!planner.movesplanned())return;
//if (!planner.has_blocks_queued()) return;
switch (key_value) {
case 0:
break;

View file

@ -1070,7 +1070,7 @@ namespace ExtUI {
void injectCommands_P(PGM_P const gcode) { queue.inject_P(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 extruder_t) { return axis_is_trusted(E_AXIS); }

View file

@ -507,7 +507,7 @@ void _ubl_map_screen_homing() {
* UBL Homing before LCD map
*/
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()) {
set_all_unhomed();
queue.inject_P(G28_STR);

View file

@ -166,7 +166,7 @@ void FTMotion::loop() {
discard_planner_block_protected();
// Check if the block needs to be runout:
if (!batchRdy && !planner.movesplanned()) {
if (!batchRdy && !planner.has_blocks_queued()) {
runoutBlock();
makeVector(); // Do an additional makeVector call to guarantee batchRdy set this loop.
}