Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into deprecate-cs-events
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Oct 2, 2024
2 parents 7119398 + 6f09270 commit b8e0749
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion opendbc_repo
Submodule opendbc_repo updated 0 files
10 changes: 3 additions & 7 deletions selfdrive/car/car_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def update(self, CS: car.CarState, CS_prev: car.CarState, CC: car.CarControl):
if self.CP.carName in ('body', 'mock'):
events = Events()

elif self.CP.carName == 'subaru':
elif self.CP.carName in ('subaru', 'mazda'):
events = self.create_common_events(CS.out, CS_prev)

elif self.CP.carName == 'ford':
Expand All @@ -54,12 +54,6 @@ def update(self, CS: car.CarState, CS_prev: car.CarState, CC: car.CarControl):
elif self.CP.carName == 'nissan':
events = self.create_common_events(CS.out, CS_prev, extra_gears=[GearShifter.brake])

elif self.CP.carName == 'mazda':
events = self.create_common_events(CS.out, CS_prev)

if CS.out.lowSpeedAlert:
events.add(EventName.belowSteerSpeed)

elif self.CP.carName == 'chrysler':
events = self.create_common_events(CS.out, CS_prev, extra_gears=[GearShifter.low])

Expand Down Expand Up @@ -212,6 +206,8 @@ def create_common_events(self, CS: structs.CarState, CS_prev: car.CarState, extr
events.add(EventName.vehicleSensorsInvalid)
if CS.invalidLkasSetting:
events.add(EventName.invalidLkasSetting)
if CS.lowSpeedAlert:
events.add(EventName.belowSteerSpeed)

# Handle button presses
for b in CS.buttonEvents:
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/modeld/models/supercombo.onnx
Git LFS file not shown
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/model_replay_ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
05b1cb87e32f280e46e0f45bbd6d76d5fd3f57a7
c4d60dfe4b677f9230eebb47614501ea8d0b99a3

0 comments on commit b8e0749

Please sign in to comment.