Leverage the ability of motion to SetMode to all know axes
parent
852ca37e8f
commit
09f81f8b33
|
|
@ -273,12 +273,8 @@ void PlanCommand(const mp::RequestMsg &rq) {
|
|||
|
||||
void SetMode(uint8_t m) {
|
||||
mg::globals.SetMotorsMode(m != 0); // remember the last mode set
|
||||
|
||||
// distribute the mode to all motors immediately
|
||||
mm::MotorMode mode = (m == 0) ? mm::Normal : mm::Stealth;
|
||||
mm::motion.SetMode(mm::Pulley, mode);
|
||||
mm::motion.SetMode(mm::Selector, mode);
|
||||
mm::motion.SetMode(mm::Idler, mode);
|
||||
mm::motion.SetMode((m == 0) ? mm::Normal : mm::Stealth);
|
||||
}
|
||||
|
||||
void ProcessRequestMsg(const mp::RequestMsg &rq) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue