diff --git a/src/logic/hw_sanity.cpp b/src/logic/hw_sanity.cpp index 180be5f..f39ad79 100644 --- a/src/logic/hw_sanity.cpp +++ b/src/logic/hw_sanity.cpp @@ -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); diff --git a/src/logic/hw_sanity.h b/src/logic/hw_sanity.h index 1456433..a97a71e 100644 --- a/src/logic/hw_sanity.h +++ b/src/logic/hw_sanity.h @@ -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; diff --git a/src/modules/motion.h b/src/modules/motion.h index f65b872..250452c 100644 --- a/src/modules/motion.h +++ b/src/modules/motion.h @@ -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; }