Use a safety param for gas interceptor (#30719)

* bump

* bump

* space

* remove from boardd

* set flag for honda to pass tests

* migrate

* Update ref_commit

* final bump

* bump cereal

* bump to master
old-commit-hash: 582743fdb5a20fbbe841aa154cf36304771d52a6
This commit is contained in:
Shane Smiskol
2023-12-14 16:53:22 -08:00
committed by GitHub
parent 9d6e3cfc28
commit 0c18b556ea
7 changed files with 10 additions and 5 deletions
+1 -1
Submodule cereal updated: d11688a90a...8ae5c51a65
+1 -1
Submodule panda updated: a88fe8c883...bb75afc84e
-1
View File
@@ -351,7 +351,6 @@ std::optional<bool> send_panda_states(PubMaster *pm, const std::vector<Panda *>
ps.setIgnitionLine(health.ignition_line_pkt);
ps.setIgnitionCan(health.ignition_can_pkt);
ps.setControlsAllowed(health.controls_allowed_pkt);
ps.setGasInterceptorDetected(health.gas_interceptor_detected_pkt);
ps.setTxBufferOverflow(health.tx_buffer_overflow_pkt);
ps.setRxBufferOverflow(health.rx_buffer_overflow_pkt);
ps.setGmlanSendErrs(health.gmlan_send_errs_pkt);
+3
View File
@@ -285,6 +285,9 @@ class CarInterface(CarInterfaceBase):
if ret.openpilotLongitudinalControl and candidate in HONDA_BOSCH:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HONDA_BOSCH_LONG
if ret.enableGasInterceptor and candidate not in HONDA_BOSCH:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HONDA_GAS_INTERCEPTOR
if candidate in HONDA_BOSCH_RADARLESS:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HONDA_RADARLESS
+3
View File
@@ -222,6 +222,9 @@ class CarInterface(CarInterfaceBase):
and not (ret.flags & ToyotaFlags.SMART_DSU)
ret.enableGasInterceptor = 0x201 in fingerprint[0]
if ret.enableGasInterceptor:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_GAS_INTERCEPTOR
# if the smartDSU is detected, openpilot can send ACC_CONTROL and the smartDSU will block it from the DSU or radar.
# since we don't yet parse radar on TSS2/TSS-P radar-based ACC cars, gate longitudinal behind experimental toggle
use_sdsu = bool(ret.flags & ToyotaFlags.SMART_DSU)
+1 -1
View File
@@ -40,7 +40,7 @@ def migrate_pandaStates(lr):
# TODO: safety param migration should be handled automatically
safety_param_migration = {
"TOYOTA PRIUS 2017": EPS_SCALE["TOYOTA PRIUS 2017"] | Panda.FLAG_TOYOTA_STOCK_LONGITUDINAL,
"TOYOTA RAV4 2017": EPS_SCALE["TOYOTA RAV4 2017"] | Panda.FLAG_TOYOTA_ALT_BRAKE,
"TOYOTA RAV4 2017": EPS_SCALE["TOYOTA RAV4 2017"] | Panda.FLAG_TOYOTA_ALT_BRAKE | Panda.FLAG_TOYOTA_GAS_INTERCEPTOR,
"KIA EV6 2022": Panda.FLAG_HYUNDAI_EV_GAS | Panda.FLAG_HYUNDAI_CANFD_HDA2,
}
+1 -1
View File
@@ -1 +1 @@
921222d49db204071f0a7006fc895690e1045b5d
ea96f935a7a16c53623c3b03e70c0fbfa6b249e7