BS_TOTAL_AXIS => BS_TOTAL_IND
This commit is contained in:
parent
5e197df89a
commit
a254354e68
|
@ -37,7 +37,7 @@ Babystep babystep;
|
||||||
|
|
||||||
volatile int16_t Babystep::steps[BS_AXIS_IND(Z_AXIS) + 1];
|
volatile int16_t Babystep::steps[BS_AXIS_IND(Z_AXIS) + 1];
|
||||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||||
int16_t Babystep::axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1];
|
int16_t Babystep::axis_total[BS_TOTAL_IND(Z_AXIS) + 1];
|
||||||
#endif
|
#endif
|
||||||
int16_t Babystep::accum;
|
int16_t Babystep::accum;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
|
||||||
|
|
||||||
accum += distance; // Count up babysteps for the UI
|
accum += distance; // Count up babysteps for the UI
|
||||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||||
axis_total[BS_TOTAL_AXIS(axis)] += distance;
|
axis_total[BS_TOTAL_IND(axis)] += distance;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
|
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
|
|
||||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||||
#if ENABLED(BABYSTEP_XY)
|
#if ENABLED(BABYSTEP_XY)
|
||||||
#define BS_TOTAL_AXIS(A) A
|
#define BS_TOTAL_IND(A) A
|
||||||
#else
|
#else
|
||||||
#define BS_TOTAL_AXIS(A) 0
|
#define BS_TOTAL_IND(A) 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -53,13 +53,13 @@ public:
|
||||||
static int16_t accum; // Total babysteps in current edit
|
static int16_t accum; // Total babysteps in current edit
|
||||||
|
|
||||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||||
static int16_t axis_total[BS_TOTAL_AXIS(Z_AXIS) + 1]; // Total babysteps since G28
|
static int16_t axis_total[BS_TOTAL_IND(Z_AXIS) + 1]; // Total babysteps since G28
|
||||||
static inline void reset_total(const AxisEnum axis) {
|
static inline void reset_total(const AxisEnum axis) {
|
||||||
if (true
|
if (true
|
||||||
#if ENABLED(BABYSTEP_XY)
|
#if ENABLED(BABYSTEP_XY)
|
||||||
&& axis == Z_AXIS
|
&& axis == Z_AXIS
|
||||||
#endif
|
#endif
|
||||||
) axis_total[BS_TOTAL_AXIS(axis)] = 0;
|
) axis_total[BS_TOTAL_IND(axis)] = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
|
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
|
||||||
lcd_put_wchar(':');
|
lcd_put_wchar(':');
|
||||||
lcd_put_u8str(LCD_Z_OFFSET_FUNC(spm * babystep.axis_total[BS_TOTAL_AXIS(axis)]));
|
lcd_put_u8str(LCD_Z_OFFSET_FUNC(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue