mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 00:43:54 +08:00
CarInterface: move stateless, common car events to car interface (#32394)
* move stateless, common car events to car interface
* try to reduce process replay diff a bit
* Revert "try to reduce process replay diff a bit"
This reverts commit b12798deabea67c5a636d6e70e80a3c21c7225ff.
* update refs
old-commit-hash: 3dfb6d7931
This commit is contained in:
@@ -282,6 +282,10 @@ class CarInterfaceBase(ABC):
|
||||
events.add(EventName.accFaulted)
|
||||
if cs_out.steeringPressed:
|
||||
events.add(EventName.steerOverride)
|
||||
if cs_out.brakePressed and cs_out.standstill:
|
||||
events.add(EventName.preEnableStandstill)
|
||||
if cs_out.gasPressed:
|
||||
events.add(EventName.gasPressedOverride)
|
||||
|
||||
# Handle button presses
|
||||
for b in cs_out.buttonEvents:
|
||||
|
||||
@@ -211,12 +211,6 @@ class Controls:
|
||||
(CS.regenBraking and (not self.CS_prev.regenBraking or not CS.standstill)):
|
||||
self.events.add(EventName.pedalPressed)
|
||||
|
||||
if CS.brakePressed and CS.standstill:
|
||||
self.events.add(EventName.preEnableStandstill)
|
||||
|
||||
if CS.gasPressed:
|
||||
self.events.add(EventName.gasPressedOverride)
|
||||
|
||||
if not self.CP.notCar:
|
||||
self.events.add_from_msg(self.sm['driverMonitoringState'].events)
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
cb76a8e9844becc5024985c61bad4ec3518eebf5
|
||||
ef0c8cb36b9cda6381412493555c21a87360e539
|
||||
Reference in New Issue
Block a user