Minor cleanup

pull/203/head
VintagePC 2022-09-21 18:28:22 -04:00
parent 8c6435d4e8
commit c5a5304775
3 changed files with 6 additions and 8 deletions

View File

@ -64,7 +64,7 @@ void HWSanity::PrepareAxis(config::Axis axis) {
bool HWSanity::StepInner() {
switch (state) {
case ProgressCode::HWTestBegin:
//auto& driver = mm::motion.DriverForAxis(config::Axis::Pulley);
error = ErrorCode::RUNNING;
test_step = 0;
state = ProgressCode::HWTestIdler;
break;
@ -101,7 +101,7 @@ bool HWSanity::StepInner() {
ml::leds.SetMode(i, ml::off);
}
}
/* FALLTHRU */
[[fallthrough]];
case ProgressCode::HWTestExec: {
auto params = mm::axisParams[axis].params;
auto &driver = mm::motion.MMU_NEEDS_ATTENTION_DriverForAxis(axis);

View File

@ -15,9 +15,7 @@ namespace logic {
class HWSanity : public CommandBase {
public:
inline HWSanity()
: CommandBase() {
Reset(0);
}
: CommandBase() {}
/// Restart the automaton
bool Reset(uint8_t param) override;

View File

@ -340,9 +340,9 @@ public:
return axisData[axis].drv;
}
/// @returns the (non-const) TMC213 driver associated with the particular axis.
/// Do not use unless you know exactly what you're doing, currently the only valid usage
/// is in the hw sanity module.
/// @returns the (non-const) TMC2130 driver associated with the particular axis.
/// Do not use unless you know exactly what you're doing, (i.e., nothing else can possibly be using
/// the axis. Currently the only valid usage is in the hw sanity module.
inline hal::tmc2130::TMC2130 &MMU_NEEDS_ATTENTION_DriverForAxis(Axis axis) {
return axisData[axis].drv;
}