Skip to content

Commit

Permalink
as long as motor off - setpoint 0
Browse files Browse the repository at this point in the history
  • Loading branch information
missxa committed Jan 20, 2021
1 parent 7912911 commit 6af9131
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/roboyPlexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ void RoboyPlexus::MotorPowerTracker(){
if (bus->GetCommunicationQuality(motor.first) > 0) {
motor.second->is_on = true;
}
if (motor.second->is_on && bus->GetCommunicationQuality(motor.first) <= 0) {
else { // as long as no communication - setpoint 0
bus->SetPoint(motor.first, 0);
motor.second->is_on = false;
ROS_INFO("motor %d on %s is off - resetting setpoint to 0.", motor.second->motor_id_global, bus->whoami().c_str());
ROS_INFO_THROTTLE(3,"motor %d on %s is off. Will ignore setpoints arriving.", motor.second->motor_id_global, bus->whoami().c_str());
}
}
}
Expand Down

0 comments on commit 6af9131

Please sign in to comment.