Static 0xe5 on Honda Bosch (#1420)

* Recreate a static 0xe5 and send to radar

* remove unneeded declaration

* Update ref_commit
pull/1435/head
Chris Souers 5 years ago committed by GitHub
parent b2be607974
commit 0f530be2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/car/honda/carcontroller.py
  2. 11
      selfdrive/car/honda/hondacan.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -155,6 +155,9 @@ class CarController():
can_sends.extend(hondacan.create_ui_commands(self.packer, pcm_speed, hud, CS.CP.carFingerprint, CS.is_metric, idx, CS.CP.isPandaBlack, CS.stock_hud)) can_sends.extend(hondacan.create_ui_commands(self.packer, pcm_speed, hud, CS.CP.carFingerprint, CS.is_metric, idx, CS.CP.isPandaBlack, CS.stock_hud))
if CS.CP.radarOffCan: if CS.CP.radarOffCan:
if (frame % 2) == 0:
idx = frame // 2
can_sends.append(hondacan.create_bosch_supplemental_1(self.packer, CS.CP.carFingerprint, idx, CS.CP.isPandaBlack))
# If using stock ACC, spam cancel command to kill gas when OP disengages. # If using stock ACC, spam cancel command to kill gas when OP disengages.
if pcm_cancel_cmd: if pcm_cancel_cmd:
can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.CANCEL, idx, CS.CP.carFingerprint, CS.CP.isPandaBlack)) can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.CANCEL, idx, CS.CP.carFingerprint, CS.CP.isPandaBlack))

@ -44,6 +44,17 @@ def create_steering_control(packer, apply_steer, lkas_active, car_fingerprint, i
return packer.make_can_msg("STEERING_CONTROL", bus, values, idx) return packer.make_can_msg("STEERING_CONTROL", bus, values, idx)
def create_bosch_supplemental_1(packer, car_fingerprint, idx, has_relay):
# non-active params
values = {
"BYTE_0": 0x04,
"BYTE_2": 0x80,
"BYTE_3": 0x10,
}
bus = get_lkas_cmd_bus(car_fingerprint, has_relay)
return packer.make_can_msg("BOSCH_SUPPLEMENTAL_1", bus, values, idx)
def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, is_metric, idx, has_relay, stock_hud): def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, is_metric, idx, has_relay, stock_hud):
commands = [] commands = []
bus_pt = get_pt_bus(car_fingerprint, has_relay) bus_pt = get_pt_bus(car_fingerprint, has_relay)

@ -1 +1 @@
783699128dfaeae66ecfd6ecd57ee19fe6d6e116 b33259e2dae9852c58b0507dbb98fb01d8b884b8

Loading…
Cancel
Save