Round model lagging frame drop percentage (#24549)

alerts: round model frame drop percentage
old-commit-hash: 076f0acd5f
taco
ntegan1 3 years ago committed by GitHub
parent 0a2c2a6b28
commit b9a07b8f05
  1. 2
      selfdrive/controls/lib/events.py

@ -277,7 +277,7 @@ def high_cpu_usage_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: boo
def modeld_lagging_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: def modeld_lagging_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
return NormalPermanentAlert("Driving model lagging", f"{sm['modelV2'].frameDropPerc}% frames dropped") return NormalPermanentAlert("Driving model lagging", f"{sm['modelV2'].frameDropPerc:.1f}% frames dropped")
def wrong_car_mode_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: def wrong_car_mode_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:

Loading…
Cancel
Save