only check low battery on EON

pull/22570/head
Adeeb Shihadeh 2021-10-15 15:04:19 -07:00
parent b427d4acc5
commit 74a3c92704
1 changed files with 2 additions and 1 deletions

View File

@ -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: