Skip to content

Commit

Permalink
fix(autoware_accel_brake_map_calibrator): fix redundantInitialization (
Browse files Browse the repository at this point in the history
…autowarefoundation#8230)

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored Aug 6, 2024
1 parent ca32505 commit ea8ff9d
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1326,15 +1326,12 @@ void AccelBrakeMapCalibrator::check_update_suggest(
using DiagStatus = diagnostic_msgs::msg::DiagnosticStatus;
using CalibrationStatus = CalibrationStatus;
CalibrationStatus accel_brake_map_status;
accel_brake_map_status.target = CalibrationStatus::ACCEL_BRAKE_MAP;
accel_brake_map_status.status = CalibrationStatus::NORMAL;
int8_t level = DiagStatus::OK;
std::string msg;
std::string msg = "OK";

accel_brake_map_status.target = CalibrationStatus::ACCEL_BRAKE_MAP;
if (is_default_map_) {
accel_brake_map_status.status = CalibrationStatus::NORMAL;
level = DiagStatus::OK;
msg = "OK";
} else {
if (!is_default_map_) {
accel_brake_map_status.status = CalibrationStatus::UNAVAILABLE;
level = DiagStatus::ERROR;
msg = "Default map is not found in " + csv_default_map_dir_;
Expand Down

0 comments on commit ea8ff9d

Please sign in to comment.