dmonitoringd: don't check for buttonEvents or vCruise change (#32454)

* drop check for carState.buttonEvents

* 100% people not use this

* huge oof

* ref comit

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 8e87655a12
pull/32199/head
ZwX1616 11 months ago committed by GitHub
parent a06c569595
commit 1f9bc952bf
  1. 7
      selfdrive/monitoring/dmonitoringd.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -19,7 +19,6 @@ def dmonitoringd_thread():
driver_status = DriverStatus(rhd_saved=params.get_bool("IsRhdDetected"), always_on=params.get_bool("AlwaysOnDM"))
v_cruise_last = 0
driver_engaged = False
# 20Hz <- dmonitoringmodeld
@ -30,12 +29,8 @@ def dmonitoringd_thread():
# Get interaction
if sm.updated['carState']:
v_cruise = sm['carState'].cruiseState.speed
driver_engaged = len(sm['carState'].buttonEvents) > 0 or \
v_cruise != v_cruise_last or \
sm['carState'].steeringPressed or \
driver_engaged = sm['carState'].steeringPressed or \
sm['carState'].gasPressed
v_cruise_last = v_cruise
if sm.updated['modelV2']:
driver_status.set_policy(sm['modelV2'], sm['carState'].vEgo)

@ -1 +1 @@
e5a385503e4307ae77c73736a602380b08e61334
f1ecdf9048fb12e289baf4933cb3ef12e486252c

Loading…
Cancel
Save