@ -167,6 +167,11 @@ class EngagementAlert(Alert):
Priority . MID , VisualAlert . none ,
audible_alert , .2 , 0. , 0. ) ,
class NormalPermanentAlert ( Alert ) :
def __init__ ( self , alert_text_1 , alert_text_2 ) :
super ( ) . __init__ ( alert_text_1 , alert_text_2 ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
# ********** alert callback functions **********
@ -257,11 +262,11 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . whitePandaUnsupported : {
ET . PERMANENT : Alert (
" White Panda Is No Longer Supported " ,
" White Panda No Longer Supported " ,
" Upgrade to comma two or black panda " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . NO_ENTRY : NoEntryAlert ( " White panda is no longer supported " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Unsupported Hardware " ) ,
} ,
EventName . invalidLkasSetting : {
@ -352,13 +357,13 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
" KEEP EYES ON ROAD: Driver Distracted " ,
" " ,
AlertStatus . normal , AlertSize . small ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . none , .0 , .1 , .1 , alert_rate = 0.75 ) ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . none , .0 , .1 , .1 ) ,
} ,
EventName . promptDriverDistracted : {
ET . WARNING : Alert (
" KEEP EYES ON ROAD " ,
" Driver Appears Distracted " ,
" Driver Distracted " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . MID , VisualAlert . steerRequired , AudibleAlert . chimeWarning2Repeat , .1 , .1 , .1 ) ,
} ,
@ -366,7 +371,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . driverDistracted : {
ET . WARNING : Alert (
" DISENGAGE IMMEDIATELY " ,
" Driver Was Distracted " ,
" Driver Distracted " ,
AlertStatus . critical , AlertSize . full ,
Priority . HIGH , VisualAlert . steerRequired , AudibleAlert . chimeWarningRepeat , .1 , .1 , .1 ) ,
} ,
@ -382,7 +387,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . promptDriverUnresponsive : {
ET . WARNING : Alert (
" TOUCH STEERING WHEEL " ,
" Driver Is Unresponsive " ,
" Driver Unresponsive " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . MID , VisualAlert . steerRequired , AudibleAlert . chimeWarning2Repeat , .1 , .1 , .1 ) ,
} ,
@ -390,7 +395,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . driverUnresponsive : {
ET . WARNING : Alert (
" DISENGAGE IMMEDIATELY " ,
" Driver Was Unresponsive " ,
" Driver Unresponsive " ,
AlertStatus . critical , AlertSize . full ,
Priority . HIGH , VisualAlert . steerRequired , AudibleAlert . chimeWarningRepeat , .1 , .1 , .1 ) ,
} ,
@ -398,7 +403,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . driverMonitorLowAcc : {
ET . WARNING : Alert (
" CHECK DRIVER FACE VISIBILITY " ,
" Driver Monitor Model Output Uncertain " ,
" Driver Monitoring Uncertain " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . none , .4 , 0. , 1.5 ) ,
} ,
@ -460,15 +465,11 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
" TAKE CONTROL " ,
" Turn Exceeds Steering Limit " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . chimePrompt , 1. , 2. , 3 .) ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . chimePrompt , 1. , 1. , 1 .) ,
} ,
EventName . fanMalfunction : {
ET . PERMANENT : Alert (
" Fan Malfunction " ,
" Contact Support " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 )
ET . PERMANENT : NormalPermanentAlert ( " Fan Malfunction " , " Contact Support " ) ,
} ,
# ********** events that affect controls state transitions **********
@ -525,15 +526,12 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
duration_hud_alert = 0. ) ,
} ,
EventName . focusRecoverActive : {
ET . WARNING : Alert (
" TAKE CONTROL " ,
" Attempting Refocus: Camera Focus Invalid " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . chimeWarning1 , .4 , 2. , 3. , creation_delay = 3.1 ) ,
} ,
EventName . outOfSpace : {
ET . PERMANENT : Alert (
" Out of Storage " ,
" " ,
AlertStatus . normal , AlertSize . small ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . NO_ENTRY : NoEntryAlert ( " Out of Storage Space " ,
duration_hud_alert = 0. ) ,
} ,
@ -542,15 +540,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
ET . NO_ENTRY : NoEntryAlert ( " Speed Too Low " ) ,
} ,
EventName . neosUpdateRequired : {
ET . PERMANENT : Alert (
" NEOS Update Required " ,
" Please Wait for Update " ,
AlertStatus . normal , AlertSize . mid ,
Priority . HIGHEST , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . NO_ENTRY : NoEntryAlert ( " NEOS Update Required " ) ,
} ,
EventName . sensorDataInvalid : {
ET . PERMANENT : Alert (
" No Data from Device Sensors " ,
@ -565,11 +554,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
} ,
EventName . soundsUnavailable : {
ET . PERMANENT : Alert (
" Speaker not found " ,
" Reboot your Device " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . PERMANENT : NormalPermanentAlert ( " Speaker not found " , " Reboot your Device " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Speaker not found " ) ,
} ,
@ -578,8 +563,13 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
} ,
EventName . overheat : {
ET . PERMANENT : Alert (
" System Overheated " ,
" " ,
AlertStatus . normal , AlertSize . small ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . SOFT_DISABLE : SoftDisableAlert ( " System Overheated " ) ,
ET . NO_ENTRY : NoEntryAlert ( " System overheated " ) ,
ET . NO_ENTRY : NoEntryAlert ( " System O verheated " ) ,
} ,
EventName . wrongGear : {
@ -588,29 +578,25 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
} ,
EventName . calibrationInvalid : {
ET . PERMANENT : Alert (
" Calibration Invalid " ,
" Reposition Device and Recalibrate " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . SOFT_DISABLE : SoftDisableAlert ( " Calibration Invalid: Reposition Device & Recalibrate " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Calibration Invalid: Reposition Device & Recalibrate " ) ,
ET . PERMANENT : NormalPermanentAlert ( " Calibration Invalid " , " Remount Device and Recalibrate " ) ,
ET . SOFT_DISABLE : SoftDisableAlert ( " Calibration Invalid: Remount Device & Recalibrate " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Calibration Invalid: Remount Device & Recalibrate " ) ,
} ,
EventName . calibrationIncomplete : {
ET . SOFT_DISABLE : SoftDisableAlert ( " Calibration in Progress " ) ,
ET . PERMANENT : calibration_incomplete_alert ,
ET . SOFT_DISABLE : SoftDisableAlert ( " Calibration in Progress " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Calibration in Progress " ) ,
} ,
EventName . doorOpen : {
ET . SOFT_DISABLE : SoftDisableAlert ( " Door Open " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Door o pen " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Door O pen " ) ,
} ,
EventName . seatbeltNotLatched : {
ET . SOFT_DISABLE : SoftDisableAlert ( " Seatbelt Unlatched " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Seatbelt u nlatched " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Seatbelt U nlatched " ) ,
} ,
EventName . espDisabled : {
@ -651,8 +637,8 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
} ,
EventName . posenetInvalid : {
ET . SOFT_DISABLE : SoftDisableAlert ( " Vision Model Output Uncertain" ) ,
ET . NO_ENTRY : NoEntryAlert ( " Vision Model Output Uncertain" ) ,
ET . SOFT_DISABLE : SoftDisableAlert ( " Model Output Uncertain " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Model Output Uncertain " ) ,
} ,
EventName . deviceFalling : {
@ -662,11 +648,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . lowMemory : {
ET . SOFT_DISABLE : SoftDisableAlert ( " Low Memory: Reboot Your Device " ) ,
ET . PERMANENT : Alert (
" RAM Critically Low " ,
" Reboot your Device " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . PERMANENT : NormalPermanentAlert ( " Low Memory " , " Reboot your Device " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Low Memory: Reboot Your Device " ,
audible_alert = AudibleAlert . chimeDisengage ) ,
} ,
@ -710,11 +692,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
ET . NO_ENTRY : NoEntryAlert ( " Cruise Fault: Restart the Car " ) ,
} ,
EventName . gasUnavailable : {
ET . IMMEDIATE_DISABLE : ImmediateDisableAlert ( " Gas Fault: Restart the Car " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Gas Error: Restart the Car " ) ,
} ,
EventName . reverseGear : {
ET . PERMANENT : Alert (
" Reverse \n Gear " ,
@ -736,11 +713,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . relayMalfunction : {
ET . IMMEDIATE_DISABLE : ImmediateDisableAlert ( " Harness Malfunction " ) ,
ET . PERMANENT : Alert (
" Harness Malfunction " ,
" Please Check Hardware " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . PERMANENT : NormalPermanentAlert ( " Harness Malfunction " , " Check Hardware " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Harness Malfunction " ) ,
} ,
@ -774,13 +747,10 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
Priority . LOW , VisualAlert . none , AudibleAlert . chimeError , .4 , 2. , 3. ) ,
} ,
# TODO: this is unclear, update check only happens offroad
EventName . internetConnectivityNeeded : {
ET . PERMANENT : Alert (
" Please connect to Internet " ,
" An Update Check Is Required to Engage " ,
AlertStatus . normal , AlertSize . mid ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
ET . NO_ENTRY : NoEntryAlert ( " Please Connect to Internet " ,
ET . PERMANENT : NormalPermanentAlert ( " Connect to Internet " , " An Update Check Is Required to Engage " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Connect to Internet " ,
audible_alert = AudibleAlert . chimeDisengage ) ,
} ,