From 09f81f8b3303f674d61892d3065684a7a6cb09d9 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Thu, 2 Sep 2021 12:06:19 +0200 Subject: [PATCH] Leverage the ability of motion to SetMode to all know axes --- src/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9429e5d..6e96921 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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) {