Skip to content

Commit

Permalink
bump cereal (commaai#30582)
Browse files Browse the repository at this point in the history
* bump cereal

* fix dmonitoringd

* update refs

* update refs
  • Loading branch information
adeebshihadeh authored Dec 2, 2023
1 parent 531e62f commit c028688
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cereal
11 changes: 3 additions & 8 deletions selfdrive/monitoring/dmonitoringd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import cereal.messaging as messaging
from cereal import car
from cereal import log
from openpilot.common.params import Params, put_bool_nonblocking
from openpilot.common.realtime import set_realtime_priority
from openpilot.selfdrive.controls.lib.events import Events
Expand All @@ -19,18 +18,12 @@ def dmonitoringd_thread():

driver_status = DriverStatus(rhd_saved=Params().get_bool("IsRhdDetected"))

sm['liveCalibration'].calStatus = log.LiveCalibrationData.Status.invalid
sm['liveCalibration'].rpyCalib = [0, 0, 0]
sm['carState'].buttonEvents = []
sm['carState'].standstill = True

v_cruise_last = 0
driver_engaged = False

# 10Hz <- dmonitoringmodeld
while True:
sm.update()

if not sm.updated['driverStateV2']:
continue

Expand All @@ -48,7 +41,9 @@ def dmonitoringd_thread():

# Get data from dmonitoringmodeld
events = Events()
driver_status.update_states(sm['driverStateV2'], sm['liveCalibration'].rpyCalib, sm['carState'].vEgo, sm['controlsState'].enabled)

if sm.all_checks():
driver_status.update_states(sm['driverStateV2'], sm['liveCalibration'].rpyCalib, sm['carState'].vEgo, sm['controlsState'].enabled)

# Block engaging after max number of distrations
if driver_status.terminal_alert_cnt >= driver_status.settings._MAX_TERMINAL_ALERTS or \
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dbea36698ba48429b201b138846165eb4c329b92
a42195085f2b92df02d13d60a8cee80354a84c7a

0 comments on commit c028688

Please sign in to comment.