Move some Stepper methods to Planner (#10719)

This commit is contained in:
Scott Lahteine
2018-05-12 09:29:17 -05:00
committed by GitHub
parent 8c81e6341a
commit ea353c3df6
12 changed files with 139 additions and 136 deletions

View File

@@ -542,11 +542,27 @@ class Planner {
*/
static void sync_from_steppers();
/**
* Get an axis position according to stepper position(s)
* For CORE machines apply translation from ABC to XYZ.
*/
static float get_axis_position_mm(const AxisEnum axis);
// SCARA AB axes are in degrees, not mm
#if IS_SCARA
FORCE_INLINE static float get_axis_position_degrees(const AxisEnum axis) { return get_axis_position_mm(axis); }
#endif
/**
* Does the buffer have any blocks queued?
*/
FORCE_INLINE static bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); }
//
// Block until all buffered steps are executed
//
static void synchronize();
/**
* "Discard" the block and "release" the memory.
* Called when the current block is no longer needed.