Skip to content

Commit

Permalink
fix(mrm_handler): simplify hazard command choice (#9929)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored Jan 16, 2025
1 parent b69241f commit a2755a4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions system/mrm_handler/src/mrm_handler/mrm_handler_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,7 @@ void MrmHandler::publishHazardCmd()
HazardLightsCommand msg;

msg.stamp = this->now();
if (is_emergency_holding_) {
// turn hazard on during emergency holding
msg.command = HazardLightsCommand::ENABLE;
} else if (isEmergency() && param_.turning_hazard_on.emergency) {
// turn hazard on if vehicle is in emergency state and
// turning hazard on if emergency flag is true
if (param_.turning_hazard_on.emergency && isEmergency()) {
msg.command = HazardLightsCommand::ENABLE;
} else {
msg.command = HazardLightsCommand::NO_COMMAND;
Expand Down

0 comments on commit a2755a4

Please sign in to comment.