Motion: fix new Step() prototype
parent
9b77623be1
commit
9b0dd2d633
|
|
@ -55,7 +55,9 @@ void Motion::AbortPlannedMoves() {
|
|||
axisData[i].ctrl.AbortPlannedMoves();
|
||||
}
|
||||
|
||||
st_timer_t Motion::Step() {}
|
||||
st_timer_t Motion::Step() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ISR() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ namespace motion {
|
|||
|
||||
using namespace hal::tmc2130;
|
||||
using pulse_gen::pos_t;
|
||||
using pulse_gen::st_timer_t;
|
||||
using pulse_gen::steps_t;
|
||||
|
||||
/// Main axis enumeration
|
||||
|
|
|
|||
|
|
@ -45,13 +45,14 @@ void Motion::Home(Axis axis, bool direction) {
|
|||
void Motion::SetMode(Axis axis, hal::tmc2130::MotorMode mode) {
|
||||
}
|
||||
|
||||
void Motion::Step() {
|
||||
st_timer_t Motion::Step() {
|
||||
for (uint8_t i = 0; i < 3; ++i) {
|
||||
if (axes[i].pos != axes[i].targetPos) {
|
||||
int8_t dirInc = (axes[i].pos < axes[i].targetPos) ? 1 : -1;
|
||||
axes[i].pos += dirInc;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool Motion::QueueEmpty() const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue