mirror of https://github.com/commaai/openpilot.git
controlsd: deprecate alertBlinkingRate (#33422)
* controlsd: deprecate alertBlinkingRate
* simplify
* update refs
old-commit-hash: f4e101c67d
This commit is contained in:
parent
5144cb0538
commit
60549c9557
|
@ -713,7 +713,6 @@ struct ControlsState @0x97ff69c53601abf1 {
|
|||
alertText2 @25 :Text;
|
||||
alertStatus @38 :AlertStatus;
|
||||
alertSize @39 :AlertSize;
|
||||
alertBlinkingRate @42 :Float32;
|
||||
alertType @44 :Text;
|
||||
alertSound @56 :Car.CarControl.HUDControl.AudibleAlert;
|
||||
engageable @41 :Bool; # can OP be engaged?
|
||||
|
@ -865,6 +864,7 @@ struct ControlsState @0x97ff69c53601abf1 {
|
|||
desiredCurvatureRateDEPRECATED @62 :Float32;
|
||||
canErrorCounterDEPRECATED @57 :UInt32;
|
||||
vPidDEPRECATED @2 :Float32;
|
||||
alertBlinkingRateDEPRECATED @42 :Float32;
|
||||
}
|
||||
|
||||
struct DrivingModelData {
|
||||
|
|
|
@ -746,7 +746,6 @@ class Controls:
|
|||
controlsState.alertText2 = current_alert.alert_text_2
|
||||
controlsState.alertSize = current_alert.alert_size
|
||||
controlsState.alertStatus = current_alert.alert_status
|
||||
controlsState.alertBlinkingRate = current_alert.alert_rate
|
||||
controlsState.alertType = current_alert.alert_type
|
||||
controlsState.alertSound = current_alert.audible_alert
|
||||
|
||||
|
|
|
@ -116,7 +116,6 @@ class Alert:
|
|||
visual_alert: car.CarControl.HUDControl.VisualAlert,
|
||||
audible_alert: car.CarControl.HUDControl.AudibleAlert,
|
||||
duration: float,
|
||||
alert_rate: float = 0.,
|
||||
creation_delay: float = 0.):
|
||||
|
||||
self.alert_text_1 = alert_text_1
|
||||
|
@ -129,7 +128,6 @@ class Alert:
|
|||
|
||||
self.duration = int(duration / DT_CTRL)
|
||||
|
||||
self.alert_rate = alert_rate
|
||||
self.creation_delay = creation_delay
|
||||
|
||||
self.alert_type = ""
|
||||
|
@ -456,7 +454,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
|||
"Touch Steering Wheel: No Face Detected",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .1, alert_rate=0.75),
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .1),
|
||||
},
|
||||
|
||||
EventName.promptDriverUnresponsive: {
|
||||
|
@ -500,7 +498,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
|||
"Steer Left to Start Lane Change Once Safe",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1, alert_rate=0.75),
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
|
||||
},
|
||||
|
||||
EventName.preLaneChangeRight: {
|
||||
|
@ -508,7 +506,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
|
|||
"Steer Right to Start Lane Change Once Safe",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1, alert_rate=0.75),
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
|
||||
},
|
||||
|
||||
EventName.laneChangeBlocked: {
|
||||
|
|
|
@ -108,7 +108,6 @@ def cycle_alerts(duration=200, is_metric=False):
|
|||
dat.controlsState.alertText2 = alert.alert_text_2
|
||||
dat.controlsState.alertSize = alert.alert_size
|
||||
dat.controlsState.alertStatus = alert.alert_status
|
||||
dat.controlsState.alertBlinkingRate = alert.alert_rate
|
||||
dat.controlsState.alertType = alert.alert_type
|
||||
dat.controlsState.alertSound = alert.audible_alert
|
||||
pm.send('controlsState', dat)
|
||||
|
|
|
@ -1 +1 @@
|
|||
51a1a4716fdd6d58fc69c586aaa62c5c25a3d93e
|
||||
a8b4c81ec1df5135ae448c8273ce14c1a98b1bfc
|
Loading…
Reference in New Issue