|
@@ -35,7 +35,7 @@
|
35
|
35
|
|
36
|
36
|
Babystep babystep;
|
37
|
37
|
|
38
|
|
-volatile int16_t Babystep::todo[BS_TODO_AXIS(Z_AXIS) + 1];
|
|
38
|
+volatile int16_t Babystep::steps[BS_TODO_AXIS(Z_AXIS) + 1];
|
39
|
39
|
|
40
|
40
|
#if HAS_LCD_MENU || ENABLED(EXTENSIBLE_UI)
|
41
|
41
|
int16_t Babystep::accum;
|
|
@@ -45,10 +45,10 @@ volatile int16_t Babystep::todo[BS_TODO_AXIS(Z_AXIS) + 1];
|
45
|
45
|
#endif
|
46
|
46
|
|
47
|
47
|
void Babystep::step_axis(const AxisEnum axis) {
|
48
|
|
- const int16_t curTodo = todo[BS_TODO_AXIS(axis)]; // get rid of volatile for performance
|
|
48
|
+ const int16_t curTodo = steps[BS_TODO_AXIS(axis)]; // get rid of volatile for performance
|
49
|
49
|
if (curTodo) {
|
50
|
50
|
stepper.babystep((AxisEnum)axis, curTodo > 0);
|
51
|
|
- if (curTodo > 0) todo[BS_TODO_AXIS(axis)]--; else todo[BS_TODO_AXIS(axis)]++;
|
|
51
|
+ if (curTodo > 0) steps[BS_TODO_AXIS(axis)]--; else steps[BS_TODO_AXIS(axis)]++;
|
52
|
52
|
}
|
53
|
53
|
}
|
54
|
54
|
|
|
@@ -94,30 +94,30 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
|
94
|
94
|
case CORE_AXIS_1: // X on CoreXY and CoreXZ, Y on CoreYZ
|
95
|
95
|
BSA_ENABLE(CORE_AXIS_1);
|
96
|
96
|
BSA_ENABLE(CORE_AXIS_2);
|
97
|
|
- todo[CORE_AXIS_1] += distance * 2;
|
98
|
|
- todo[CORE_AXIS_2] += distance * 2;
|
|
97
|
+ steps[CORE_AXIS_1] += distance * 2;
|
|
98
|
+ steps[CORE_AXIS_2] += distance * 2;
|
99
|
99
|
break;
|
100
|
100
|
case CORE_AXIS_2: // Y on CoreXY, Z on CoreXZ and CoreYZ
|
101
|
101
|
BSA_ENABLE(CORE_AXIS_1);
|
102
|
102
|
BSA_ENABLE(CORE_AXIS_2);
|
103
|
|
- todo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
104
|
|
- todo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
|
103
|
+ steps[CORE_AXIS_1] += CORESIGN(distance * 2);
|
|
104
|
+ steps[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
105
|
105
|
break;
|
106
|
106
|
case NORMAL_AXIS: // Z on CoreXY, Y on CoreXZ, X on CoreYZ
|
107
|
107
|
default:
|
108
|
108
|
BSA_ENABLE(NORMAL_AXIS);
|
109
|
|
- todo[NORMAL_AXIS] += distance;
|
|
109
|
+ steps[NORMAL_AXIS] += distance;
|
110
|
110
|
break;
|
111
|
111
|
}
|
112
|
112
|
#elif CORE_IS_XZ || CORE_IS_YZ
|
113
|
113
|
// Only Z stepping needs to be handled here
|
114
|
114
|
BSA_ENABLE(CORE_AXIS_1);
|
115
|
115
|
BSA_ENABLE(CORE_AXIS_2);
|
116
|
|
- todo[CORE_AXIS_1] += CORESIGN(distance * 2);
|
117
|
|
- todo[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
|
116
|
+ steps[CORE_AXIS_1] += CORESIGN(distance * 2);
|
|
117
|
+ steps[CORE_AXIS_2] -= CORESIGN(distance * 2);
|
118
|
118
|
#else
|
119
|
119
|
BSA_ENABLE(Z_AXIS);
|
120
|
|
- todo[Z_AXIS] += distance;
|
|
120
|
+ steps[Z_AXIS] += distance;
|
121
|
121
|
#endif
|
122
|
122
|
#else
|
123
|
123
|
#if ENABLED(BABYSTEP_XY)
|
|
@@ -125,7 +125,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
|
125
|
125
|
#else
|
126
|
126
|
BSA_ENABLE(Z_AXIS);
|
127
|
127
|
#endif
|
128
|
|
- todo[BS_TODO_AXIS(axis)] += distance;
|
|
128
|
+ steps[BS_TODO_AXIS(axis)] += distance;
|
129
|
129
|
#endif
|
130
|
130
|
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
|
131
|
131
|
gcode.reset_stepper_timeout();
|