Asynchronous M114 and (R)ealtime position option (#17032)
This commit is contained in:
@ -289,6 +289,12 @@ class Planner {
|
||||
static float extruder_advance_K[EXTRUDERS];
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The current position of the tool in absolute steps
|
||||
* Recalculated if any axis_steps_per_mm are changed by gcode
|
||||
*/
|
||||
static xyze_long_t position;
|
||||
|
||||
#if HAS_POSITION_FLOAT
|
||||
static xyze_pos_t position_float;
|
||||
#endif
|
||||
@ -305,12 +311,6 @@ class Planner {
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* The current position of the tool in absolute steps
|
||||
* Recalculated if any axis_steps_per_mm are changed by gcode
|
||||
*/
|
||||
static xyze_long_t position;
|
||||
|
||||
/**
|
||||
* Speed of previous path line segment
|
||||
*/
|
||||
@ -725,6 +725,16 @@ class Planner {
|
||||
*/
|
||||
static float get_axis_position_mm(const AxisEnum axis);
|
||||
|
||||
static inline abce_pos_t get_axis_positions_mm() {
|
||||
const abce_pos_t out = {
|
||||
get_axis_position_mm(A_AXIS),
|
||||
get_axis_position_mm(B_AXIS),
|
||||
get_axis_position_mm(C_AXIS),
|
||||
get_axis_position_mm(E_AXIS)
|
||||
};
|
||||
return out;
|
||||
}
|
||||
|
||||
// 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); }
|
||||
|
Reference in New Issue
Block a user