Skip to content

Commit

Permalink
inline
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 17, 2021
1 parent 23cdaff commit 4370e04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@
#include "../feature/power.h"
#endif

#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
#include "../feature/closedloop.h"
#endif

#if ENABLED(BACKLASH_COMPENSATION)
#include "../feature/backlash.h"
#endif
Expand Down Expand Up @@ -1716,12 +1712,6 @@ float Planner::get_axis_position_mm(const AxisEnum axis) {
return axis_steps * steps_to_mm[axis];
}

bool Planner::busy() {
return (has_blocks_queued() || cleaning_buffer_counter
|| TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING())
);
}

/**
* Block until all buffered steps are executed / cleaned
*/
Expand Down
12 changes: 10 additions & 2 deletions Marlin/src/module/planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
#define IS_PAGE(B) false
#endif

#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
#include "../feature/closedloop.h"
#endif

// Feedrate for manual moves
#ifdef MANUAL_FEEDRATE
constexpr xyze_feedrate_t _mf = MANUAL_FEEDRATE,
Expand Down Expand Up @@ -879,8 +883,12 @@ class Planner {
// Triggered position of an axis in mm (not core-savvy)
static float triggered_position_mm(const AxisEnum axis);

// Some buffered steps to be executed / cleaned
static bool busy();
// Blocks are queued, or we're running out moves, or the closed loop controller is waiting
static inline bool busy() {
return (has_blocks_queued() || cleaning_buffer_counter
|| TERN0(EXTERNAL_CLOSED_LOOP_CONTROLLER, CLOSED_LOOP_WAITING())
);
}

// Block until all buffered steps are executed / cleaned
static void synchronize();
Expand Down

0 comments on commit 4370e04

Please sign in to comment.