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: 582743fdb5
chrysler-long2
Shane Smiskol 1 year ago committed by GitHub
parent 9d6e3cfc28
commit 0c18b556ea
  1. 2
      cereal
  2. 2
      panda
  3. 1
      selfdrive/boardd/boardd.cc
  4. 3
      selfdrive/car/honda/interface.py
  5. 3
      selfdrive/car/toyota/interface.py
  6. 2
      selfdrive/test/process_replay/migration.py
  7. 2
      selfdrive/test/process_replay/ref_commit

@ -1 +1 @@
Subproject commit d11688a90a1cebacb3fe00dcfbba5f27551b2d89
Subproject commit 8ae5c51a6515c171f3a82c9511a18d79a9e55c07

@ -1 +1 @@
Subproject commit a88fe8c883758951ba2854eb2f6726d5365df099
Subproject commit bb75afc84e4d33af1554ada81851547db648e33e

@ -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);

@ -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

@ -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)

@ -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 @@
921222d49db204071f0a7006fc895690e1045b5d
ea96f935a7a16c53623c3b03e70c0fbfa6b249e7

Loading…
Cancel
Save