|
|
@ -190,11 +190,11 @@ class Controls: |
|
|
|
self.events.add(EventName.lowBattery) |
|
|
|
self.events.add(EventName.lowBattery) |
|
|
|
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red: |
|
|
|
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red: |
|
|
|
self.events.add(EventName.overheat) |
|
|
|
self.events.add(EventName.overheat) |
|
|
|
if self.sm['deviceState'].freeSpacePercent < 7: |
|
|
|
if self.sm['deviceState'].freeSpacePercent < 7 and not SIMULATION: |
|
|
|
# under 7% of space free no enable allowed |
|
|
|
# under 7% of space free no enable allowed |
|
|
|
self.events.add(EventName.outOfSpace) |
|
|
|
self.events.add(EventName.outOfSpace) |
|
|
|
# TODO: make tici threshold the same |
|
|
|
# TODO: make tici threshold the same |
|
|
|
if self.sm['deviceState'].memoryUsagePercent > (90 if TICI else 65): |
|
|
|
if self.sm['deviceState'].memoryUsagePercent > (90 if TICI else 65) and not SIMULATION: |
|
|
|
self.events.add(EventName.lowMemory) |
|
|
|
self.events.add(EventName.lowMemory) |
|
|
|
|
|
|
|
|
|
|
|
# Alert if fan isn't spinning for 5 seconds |
|
|
|
# Alert if fan isn't spinning for 5 seconds |
|
|
|