mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 00:05:57 +08:00
DM: Use carControl.latActive for MADS DM monitoring (#845)
This commit is contained in:
@@ -11,7 +11,7 @@ def dmonitoringd_thread():
|
||||
params = Params()
|
||||
pm = messaging.PubMaster(['driverMonitoringState'])
|
||||
sm = messaging.SubMaster(['driverStateV2', 'liveCalibration', 'carState', 'selfdriveState', 'modelV2',
|
||||
'selfdriveStateSP'], poll='driverStateV2')
|
||||
'carControl'], poll='driverStateV2')
|
||||
|
||||
DM = DriverMonitoring(rhd_saved=params.get_bool("IsRhdDetected"), always_on=params.get_bool("AlwaysOnDM"))
|
||||
|
||||
|
||||
@@ -403,13 +403,13 @@ class DriverMonitoring:
|
||||
driver_state=sm['driverStateV2'],
|
||||
cal_rpy=sm['liveCalibration'].rpyCalib,
|
||||
car_speed=sm['carState'].vEgo,
|
||||
op_engaged=sm['selfdriveState'].enabled or sm['selfdriveStateSP'].mads.active
|
||||
op_engaged=sm['selfdriveState'].enabled or sm['carControl'].latActive
|
||||
)
|
||||
|
||||
# Update distraction events
|
||||
self._update_events(
|
||||
driver_engaged=sm['carState'].steeringPressed or sm['carState'].gasPressed,
|
||||
op_engaged=sm['selfdriveState'].enabled or sm['selfdriveStateSP'].mads.active,
|
||||
op_engaged=sm['selfdriveState'].enabled or sm['carControl'].latActive,
|
||||
standstill=sm['carState'].standstill,
|
||||
wrong_gear=sm['carState'].gearShifter in [car.CarState.GearShifter.reverse, car.CarState.GearShifter.park],
|
||||
car_speed=sm['carState'].vEgo
|
||||
|
||||
Reference in New Issue
Block a user