@ -171,7 +171,7 @@ class EngagementAlert(Alert):
class NormalPermanentAlert ( Alert ) :
class NormalPermanentAlert ( Alert ) :
def __init__ ( self , alert_text_1 , alert_text_2 ) :
def __init__ ( self , alert_text_1 , alert_text_2 ) :
super ( ) . __init__ ( alert_text_1 , alert_text_2 ,
super ( ) . __init__ ( alert_text_1 , alert_text_2 ,
AlertStatus . normal , AlertSize . mid ,
AlertStatus . normal , AlertSize . mid if len ( alert_text_2 ) else AlertSize . small ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
Priority . LOWER , VisualAlert . none , AudibleAlert . none , 0. , 0. , .2 ) ,
# ********** alert callback functions **********
# ********** alert callback functions **********
@ -292,6 +292,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
" Stock AEB: Risk of Collision " ,
" Stock AEB: Risk of Collision " ,
AlertStatus . critical , AlertSize . full ,
AlertStatus . critical , AlertSize . full ,
Priority . HIGHEST , VisualAlert . fcw , AudibleAlert . none , 1. , 2. , 2. ) ,
Priority . HIGHEST , VisualAlert . fcw , AudibleAlert . none , 1. , 2. , 2. ) ,
ET . NO_ENTRY : NoEntryAlert ( " Stock AEB: Risk of Collision " ) ,
} ,
} ,
EventName . stockFcw : {
EventName . stockFcw : {
@ -300,6 +301,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
" Stock FCW: Risk of Collision " ,
" Stock FCW: Risk of Collision " ,
AlertStatus . critical , AlertSize . full ,
AlertStatus . critical , AlertSize . full ,
Priority . HIGHEST , VisualAlert . fcw , AudibleAlert . none , 1. , 2. , 2. ) ,
Priority . HIGHEST , VisualAlert . fcw , AudibleAlert . none , 1. , 2. , 2. ) ,
ET . NO_ENTRY : NoEntryAlert ( " Stock FCW: Risk of Collision " ) ,
} ,
} ,
EventName . fcw : {
EventName . fcw : {
@ -330,6 +332,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
EventName . vehicleModelInvalid : {
EventName . vehicleModelInvalid : {
ET . NO_ENTRY : NoEntryAlert ( " Vehicle Parameter Identification Failed " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Vehicle Parameter Identification Failed " ) ,
ET . SOFT_DISABLE : SoftDisableAlert ( " Vehicle Parameter Identification Failed " ) ,
ET . WARNING : Alert (
ET . WARNING : Alert (
" Vehicle Parameter Identification Failed " ,
" Vehicle Parameter Identification Failed " ,
" " ,
" " ,
@ -337,14 +340,6 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
Priority . LOWEST , VisualAlert . steerRequired , AudibleAlert . none , .0 , .0 , .1 ) ,
Priority . LOWEST , VisualAlert . steerRequired , AudibleAlert . none , .0 , .0 , .1 ) ,
} ,
} ,
EventName . steerTempUnavailableMute : {
ET . WARNING : Alert (
" TAKE CONTROL " ,
" Steering Temporarily Unavailable " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . LOW , VisualAlert . none , AudibleAlert . none , .2 , .2 , .2 ) ,
} ,
EventName . preDriverDistracted : {
EventName . preDriverDistracted : {
ET . WARNING : Alert (
ET . WARNING : Alert (
" KEEP EYES ON ROAD: Driver Distracted " ,
" KEEP EYES ON ROAD: Driver Distracted " ,
@ -518,11 +513,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
} ,
} ,
EventName . steerTempUnavailable : {
EventName . steerTempUnavailable : {
ET . WARNING : Alert (
ET . SOFT_DISABLE : SoftDisableAlert ( " Steering Temporarily Unavailable " ) ,
" TAKE CONTROL " ,
" Steering Temporarily Unavailable " ,
AlertStatus . userPrompt , AlertSize . mid ,
Priority . LOW , VisualAlert . steerRequired , AudibleAlert . chimeWarning1 , .4 , 2. , 1. ) ,
ET . NO_ENTRY : NoEntryAlert ( " Steering Temporarily Unavailable " ,
ET . NO_ENTRY : NoEntryAlert ( " Steering Temporarily Unavailable " ,
duration_hud_alert = 0. ) ,
duration_hud_alert = 0. ) ,
} ,
} ,
@ -648,9 +639,10 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
audible_alert = AudibleAlert . chimeDisengage ) ,
audible_alert = AudibleAlert . chimeDisengage ) ,
} ,
} ,
EventName . controlsFailed : {
EventName . accFaulted : {
ET . IMMEDIATE_DISABLE : ImmediateDisableAlert ( " Controls Failed " ) ,
ET . IMMEDIATE_DISABLE : ImmediateDisableAlert ( " Cruise Faulted " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Controls Failed " ) ,
ET . PERMANENT : NormalPermanentAlert ( " Cruise Faulted " , " " ) ,
ET . NO_ENTRY : NoEntryAlert ( " Cruise Faulted " ) ,
} ,
} ,
EventName . controlsMismatch : {
EventName . controlsMismatch : {
@ -734,7 +726,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
" Speed Too High " ,
" Speed Too High " ,
" Model uncertain at this speed " ,
" Model uncertain at this speed " ,
AlertStatus . normal , AlertSize . mid ,
AlertStatus . normal , AlertSize . mid ,
Priority . HIGH , VisualAlert . steerRequired , AudibleAlert . none , 2.2 , 3. , 4. ) ,
Priority . HIGH , VisualAlert . steerRequired , AudibleAlert . chimeWarningRepeat , 2.2 , 3. , 4. ) ,
ET . NO_ENTRY : Alert (
ET . NO_ENTRY : Alert (
" Speed Too High " ,
" Speed Too High " ,
" Slow down to engage " ,
" Slow down to engage " ,