MADS safety: enable heartbeat and lateral controls mismatch checks (#1801)

* init

* nah

* rename

* bump

* bump
This commit is contained in:
Jason Wen
2026-04-14 16:28:13 -04:00
committed by GitHub
parent 30a858c23d
commit c23f2dce2c
8 changed files with 30 additions and 18 deletions
+2 -2
View File
@@ -106,8 +106,8 @@ cereal::PandaState::PandaType Panda::get_hw_type() {
void Panda::send_heartbeat(bool engaged) {
control_write(0xf3, engaged, 0);
void Panda::send_heartbeat(bool engaged, bool engaged_mads) {
control_write(0xf3, engaged, engaged_mads);
}
void Panda::set_can_speed_kbps(uint16_t bus, uint16_t speed) {
+1 -1
View File
@@ -64,7 +64,7 @@ public:
// Panda functionality
cereal::PandaState::PandaType get_hw_type();
void set_safety_model(cereal::CarParams::SafetyModel safety_model, uint16_t safety_param=0U);
void send_heartbeat(bool engaged);
void send_heartbeat(bool engaged, bool engaged_mads = false);
void set_can_speed_kbps(uint16_t bus, uint16_t speed);
void set_data_speed_kbps(uint16_t bus, uint16_t speed);
bool can_receive(std::vector<can_frame>& out_vec);
+2
View File
@@ -92,6 +92,8 @@ class SimulatedCar:
'ignitionLine': simulator_state.ignition,
'pandaType': "blackPanda",
'controlsAllowed': True,
'controlsAllowedLateral': True,
'controlsAllowedLongitudinal': True,
'safetyModel': 'hondaBosch',
'alternativeExperience': self.sm["carParams"].alternativeExperience,
'safetyParam': HondaSafetyFlags.RADARLESS.value | HondaSafetyFlags.BOSCH_LONG.value,