Skip to content

Commit

Permalink
Don't repeatedly send packets commanding 0 power to drivebase
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaybd committed Dec 5, 2023
1 parent e7b7b62 commit 6a99910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/network/MissionControlProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6a99910

Please sign in to comment.