From 6a999108a448764ef8ecfffa08734b04f709f92b Mon Sep 17 00:00:00 2001 From: Abhay D Date: Mon, 4 Dec 2023 20:38:12 -0800 Subject: [PATCH] Don't repeatedly send packets commanding 0 power to drivebase --- src/network/MissionControlProtocol.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/MissionControlProtocol.cpp b/src/network/MissionControlProtocol.cpp index 63e1731f..05463e2b 100644 --- a/src/network/MissionControlProtocol.cpp +++ b/src/network/MissionControlProtocol.cpp @@ -434,7 +434,9 @@ void MissionControlProtocol::jointPowerRepeatTask() { } } if (this->_last_cmd_vel) { - robot::setCmdVel(this->_last_cmd_vel->first, this->_last_cmd_vel->second); + if (this->_last_cmd_vel->first != 0.0 || this->_last_cmd_vel->second != 0.0) { + robot::setCmdVel(this->_last_cmd_vel->first, this->_last_cmd_vel->second); + } } } _power_repeat_cv.wait_for(joint_repeat_lock, Constants::JOINT_POWER_REPEAT_PERIOD,