only check low battery on EON

old-commit-hash: 74a3c92704
commatwo_master
Adeeb Shihadeh 4 years ago
parent d7fd6c3f00
commit 3802eab361
  1. 3
      selfdrive/controls/controlsd.py

@ -194,7 +194,8 @@ class Controls:
return
# Create events for battery, temperature, disk space, and memory
if EON and self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError:
if EON and (self.sm['peripheralState'].pandaType != PandaType.uno) and \
self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError:
# at zero percent battery, while discharging, OP should not allowed
self.events.add(EventName.lowBattery)
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red:

Loading…
Cancel
Save