|
|
|
@ -206,9 +206,11 @@ class Controls: |
|
|
|
|
# TODO: make tici threshold the same |
|
|
|
|
if self.sm['deviceState'].memoryUsagePercent > (90 if TICI else 65) and not SIMULATION: |
|
|
|
|
self.events.add(EventName.lowMemory) |
|
|
|
|
cpus = list(self.sm['deviceState'].cpuUsagePercent)[:(-1 if EON else None)] |
|
|
|
|
if max(cpus, default=0) > 95 and not SIMULATION: |
|
|
|
|
self.events.add(EventName.highCpuUsage) |
|
|
|
|
|
|
|
|
|
# TODO: enable this once loggerd CPU usage is more reasonable |
|
|
|
|
#cpus = list(self.sm['deviceState'].cpuUsagePercent)[:(-1 if EON else None)] |
|
|
|
|
#if max(cpus, default=0) > 95 and not SIMULATION: |
|
|
|
|
# self.events.add(EventName.highCpuUsage) |
|
|
|
|
|
|
|
|
|
# Alert if fan isn't spinning for 5 seconds |
|
|
|
|
if self.sm['peripheralState'].pandaType in [PandaType.uno, PandaType.dos]: |
|
|
|
|