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