Minor cleanup
parent
8c6435d4e8
commit
c5a5304775
|
|
@ -64,7 +64,7 @@ void HWSanity::PrepareAxis(config::Axis axis) {
|
||||||
bool HWSanity::StepInner() {
|
bool HWSanity::StepInner() {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case ProgressCode::HWTestBegin:
|
case ProgressCode::HWTestBegin:
|
||||||
//auto& driver = mm::motion.DriverForAxis(config::Axis::Pulley);
|
error = ErrorCode::RUNNING;
|
||||||
test_step = 0;
|
test_step = 0;
|
||||||
state = ProgressCode::HWTestIdler;
|
state = ProgressCode::HWTestIdler;
|
||||||
break;
|
break;
|
||||||
|
|
@ -101,7 +101,7 @@ bool HWSanity::StepInner() {
|
||||||
ml::leds.SetMode(i, ml::off);
|
ml::leds.SetMode(i, ml::off);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* FALLTHRU */
|
[[fallthrough]];
|
||||||
case ProgressCode::HWTestExec: {
|
case ProgressCode::HWTestExec: {
|
||||||
auto params = mm::axisParams[axis].params;
|
auto params = mm::axisParams[axis].params;
|
||||||
auto &driver = mm::motion.MMU_NEEDS_ATTENTION_DriverForAxis(axis);
|
auto &driver = mm::motion.MMU_NEEDS_ATTENTION_DriverForAxis(axis);
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,7 @@ namespace logic {
|
||||||
class HWSanity : public CommandBase {
|
class HWSanity : public CommandBase {
|
||||||
public:
|
public:
|
||||||
inline HWSanity()
|
inline HWSanity()
|
||||||
: CommandBase() {
|
: CommandBase() {}
|
||||||
Reset(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Restart the automaton
|
/// Restart the automaton
|
||||||
bool Reset(uint8_t param) override;
|
bool Reset(uint8_t param) override;
|
||||||
|
|
|
||||||
|
|
@ -340,9 +340,9 @@ public:
|
||||||
return axisData[axis].drv;
|
return axisData[axis].drv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @returns the (non-const) TMC213 driver associated with the particular axis.
|
/// @returns the (non-const) TMC2130 driver associated with the particular axis.
|
||||||
/// Do not use unless you know exactly what you're doing, currently the only valid usage
|
/// Do not use unless you know exactly what you're doing, (i.e., nothing else can possibly be using
|
||||||
/// is in the hw sanity module.
|
/// the axis. Currently the only valid usage is in the hw sanity module.
|
||||||
inline hal::tmc2130::TMC2130 &MMU_NEEDS_ATTENTION_DriverForAxis(Axis axis) {
|
inline hal::tmc2130::TMC2130 &MMU_NEEDS_ATTENTION_DriverForAxis(Axis axis) {
|
||||||
return axisData[axis].drv;
|
return axisData[axis].drv;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue