diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index ce9f8150e0..911a57de22 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -481,34 +481,34 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo EventName.preLaneChangeLeft: { ET.WARNING: Alert( - "Steer Left to Start Lane Change", - "Monitor Other Vehicles", - AlertStatus.normal, AlertSize.mid, - Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75), + "Steer Left to Start Lane Change Once Safe", + "", + AlertStatus.normal, AlertSize.small, + Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.75), }, EventName.preLaneChangeRight: { ET.WARNING: Alert( - "Steer Right to Start Lane Change", - "Monitor Other Vehicles", - AlertStatus.normal, AlertSize.mid, - Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75), + "Steer Right to Start Lane Change Once Safe", + "", + AlertStatus.normal, AlertSize.small, + Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.75), }, EventName.laneChangeBlocked: { ET.WARNING: Alert( "Car Detected in Blindspot", - "Monitor Other Vehicles", - AlertStatus.userPrompt, AlertSize.mid, - Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, .1, .1, .1), + "", + AlertStatus.userPrompt, AlertSize.small, + Priority.LOW, VisualAlert.none, AudibleAlert.chimePrompt, .1, .1, .1), }, EventName.laneChange: { ET.WARNING: Alert( - "Changing Lane", - "Monitor Other Vehicles", - AlertStatus.normal, AlertSize.mid, - Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1), + "Changing Lanes", + "", + AlertStatus.normal, AlertSize.small, + Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1), }, EventName.steerSaturated: { diff --git a/selfdrive/debug/cycle_alerts.py b/selfdrive/debug/cycle_alerts.py index 98e7eafecd..c35791682b 100755 --- a/selfdrive/debug/cycle_alerts.py +++ b/selfdrive/debug/cycle_alerts.py @@ -24,16 +24,13 @@ def cycle_alerts(duration=2000, is_metric=False): sm = messaging.SubMaster(['deviceState', 'pandaState', 'roadCameraState', 'modelV2', 'liveCalibration', 'driverMonitoringState', 'longitudinalPlan', 'lateralPlan', 'liveLocationKalman']) - controls_state = messaging.pub_sock('controlsState') - deviceState = messaging.pub_sock('deviceState') - - idx, last_alert_millis = 0, 0 + pm = messaging.PubMaster(['controlsState', 'pandaState', 'deviceState']) events = Events() AM = AlertManager() frame = 0 - + idx, last_alert_millis = 0, 0 while 1: if frame % duration == 0: idx = (idx + 1) % len(alerts) @@ -50,7 +47,6 @@ def cycle_alerts(duration=2000, is_metric=False): dat = messaging.new_message() dat.init('controlsState') - dat.controlsState.alertText1 = AM.alert_text_1 dat.controlsState.alertText2 = AM.alert_text_2 dat.controlsState.alertSize = AM.alert_size @@ -58,14 +54,18 @@ def cycle_alerts(duration=2000, is_metric=False): dat.controlsState.alertBlinkingRate = AM.alert_rate dat.controlsState.alertType = AM.alert_type dat.controlsState.alertSound = AM.audible_alert - controls_state.send(dat.to_bytes()) + pm.send('controlsState', dat) dat = messaging.new_message() dat.init('deviceState') dat.deviceState.started = True - deviceState.send(dat.to_bytes()) + pm.send('deviceState', dat) + + dat = messaging.new_message() + dat.init('pandaState') + dat.pandaState.ignitionLine = True + pm.send('pandaState', dat) - frame += 1 time.sleep(0.01) if __name__ == '__main__': diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 7aed78b316..1d9124bbd6 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -658824c1198bd9e4c2b2c6d1c9de9bcae04c7057 \ No newline at end of file +dd32c3e4f189e08e2bb20fcf3c0c16116077a959 \ No newline at end of file