diff --git a/cereal b/cereal index fa9dca01dc5794..7986119bffd524 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit fa9dca01dc57944e7cb173f01c3382c3e2cb099c +Subproject commit 7986119bffd5246721ed27e7de0b637108d9e9ab diff --git a/panda b/panda index e78c315744da6a..fa2c9831c2176f 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit e78c315744da6a92e1bc44ebd60f4c83b89d412b +Subproject commit fa2c9831c2176f7664b29db7941df4241a0610e4 diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 9ae00d4e90bca7..dac4730d19559c 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -161,7 +161,7 @@ bool safety_setter_thread(std::vector pandas) { int safety_param; auto safety_configs = car_params.getSafetyConfigs(); - uint16_t unsafe_mode = car_params.getUnsafeMode(); + uint16_t alternative_experience = car_params.getAlternativeExperience(); for (uint32_t i = 0; i < pandas.size(); i++) { auto panda = pandas[i]; @@ -174,8 +174,8 @@ bool safety_setter_thread(std::vector pandas) { safety_param = 0; } - LOGW("panda %d: setting safety model: %d, param: %d, unsafe mode: %d", i, (int)safety_model, safety_param, unsafe_mode); - panda->set_unsafe_mode(unsafe_mode); + LOGW("panda %d: setting safety model: %d, param: %d, alternative experience: %d", i, (int)safety_model, safety_param, alternative_experience); + panda->set_alternative_experience(alternative_experience); panda->set_safety_model(safety_model, safety_param); } @@ -362,7 +362,7 @@ std::optional send_panda_states(PubMaster *pm, const std::vector ps.setFaultStatus(cereal::PandaState::FaultStatus(health.fault_status_pkt)); ps.setPowerSaveEnabled((bool)(health.power_save_enabled_pkt)); ps.setHeartbeatLost((bool)(health.heartbeat_lost_pkt)); - ps.setUnsafeMode(health.unsafe_mode_pkt); + ps.setAlternativeExperience(health.alternative_experience_pkt); ps.setHarnessStatus(cereal::PandaState::HarnessStatus(health.car_harness_status_pkt)); // Convert faults bitset to capnp list diff --git a/selfdrive/boardd/panda.cc b/selfdrive/boardd/panda.cc index 4a7af2b718016a..7b4e81f9ae0d1a 100644 --- a/selfdrive/boardd/panda.cc +++ b/selfdrive/boardd/panda.cc @@ -251,8 +251,8 @@ void Panda::set_safety_model(cereal::CarParams::SafetyModel safety_model, int sa usb_write(0xdc, (uint16_t)safety_model, safety_param); } -void Panda::set_unsafe_mode(uint16_t unsafe_mode) { - usb_write(0xdf, unsafe_mode, 0); +void Panda::set_alternative_experience(uint16_t alternative_experience) { + usb_write(0xdf, alternative_experience, 0); } cereal::PandaState::PandaType Panda::get_hw_type() { diff --git a/selfdrive/boardd/panda.h b/selfdrive/boardd/panda.h index 279c96a6a683bf..294553b413dafc 100644 --- a/selfdrive/boardd/panda.h +++ b/selfdrive/boardd/panda.h @@ -74,7 +74,7 @@ class Panda { // Panda functionality cereal::PandaState::PandaType get_hw_type(); void set_safety_model(cereal::CarParams::SafetyModel safety_model, int safety_param=0); - void set_unsafe_mode(uint16_t unsafe_mode); + void set_alternative_experience(uint16_t alternative_experience); void set_rtc(struct tm sys_time); struct tm get_rtc(); void set_fan_speed(uint16_t fan_speed); diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index fdc0efb7761bcd..93675303047df9 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -94,7 +94,7 @@ def __init__(self, sm=None, pm=None, can_sock=None): get_one_can(self.can_sock) self.CI, self.CP = get_car(self.can_sock, self.pm.sock['sendcan']) - self.CP.unsafeMode = 0 # see panda/board/safety_declarations.h for allowed values + self.CP.alternativeExperience = 0 # see panda/board/safety_declarations.h for allowed values # read params self.is_metric = params.get_bool("IsMetric") @@ -260,7 +260,7 @@ def update_events(self, CS): if i < len(self.CP.safetyConfigs): safety_mismatch = pandaState.safetyModel != self.CP.safetyConfigs[i].safetyModel or \ pandaState.safetyParam != self.CP.safetyConfigs[i].safetyParam or \ - pandaState.unsafeMode != self.CP.unsafeMode + pandaState.alternativeExperience != self.CP.alternativeExperience else: safety_mismatch = pandaState.safetyModel not in IGNORED_SAFETY_MODES