diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 573bd6f962..478db2375c 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -1,6 +1,7 @@ import os from common.params import Params from common.basedir import BASEDIR +from selfdrive.version import comma_remote, tested_branch from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars from selfdrive.car.vin import get_vin, VIN_UNKNOWN from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car @@ -13,11 +14,12 @@ EventName = car.CarEvent.EventName HwType = log.HealthData.HwType -def get_startup_event(car_recognized, controller_available, hw_type): - event = EventName.startup - if Params().get("GitRemote", encoding="utf8") in ['git@github.com:commaai/openpilot.git', 'https://github.com/commaai/openpilot.git']: - if Params().get("GitBranch", encoding="utf8") not in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam']: - event = EventName.startupMaster +def get_startup_event(car_recognized, controller_available): + if comma_remote and tested_branch: + event = EventName.startup + else: + event = EventName.startupMaster + if not car_recognized: event = EventName.startupNoCar elif car_recognized and not controller_available: diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 37b7e802d6..fed3f1d088 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -130,7 +130,7 @@ class Controls: self.saturated_count = 0 self.distance_traveled = 0 self.events_prev = [] - self.current_alert_types = [] + self.current_alert_types = [ET.PERMANENT] self.sm['liveCalibration'].calStatus = Calibration.INVALID self.sm['thermal'].freeSpace = 1. @@ -138,7 +138,7 @@ class Controls: self.sm['dMonitoringState'].awarenessStatus = 1. self.sm['dMonitoringState'].faceDetected = False - self.startup_event = get_startup_event(car_recognized, controller_available, hw_type) + self.startup_event = get_startup_event(car_recognized, controller_available) if not sounds_available: self.events.add(EventName.soundsUnavailable, static=True) diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 079c79e72b..6fd2aaa0e2 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -294,7 +294,7 @@ EVENTS = { "Dashcam Mode", "Car Unrecognized", AlertStatus.normal, AlertSize.mid, - Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2), + Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2), }, EventName.stockAeb: { diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 3423ee6519..be6523e27b 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -fe829cbe7ff161f098f680f3bfe3b8daeba2f220 \ No newline at end of file +a8b50cfc06473f66896b3f74a562263d3cccec36 \ No newline at end of file diff --git a/selfdrive/version.py b/selfdrive/version.py index 13a16022ac..02416a90a0 100644 --- a/selfdrive/version.py +++ b/selfdrive/version.py @@ -46,6 +46,8 @@ training_version = b"0.2.0" terms_version = b"2" dirty = True +comma_remote = False +tested_branch = False origin = get_git_remote() branch = get_git_full_branchname() @@ -58,6 +60,7 @@ try: if (origin is not None) and (branch is not None): comma_remote = origin.startswith('git@github.com:commaai') or origin.startswith('https://github.com/commaai') + tested_branch = branch in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam'] dirty = not comma_remote dirty = dirty or ('master' in branch)