fix apk after cereal cleanup (#20098)

* actually a percent

* update apk

* update refs
albatross
Adeeb Shihadeh 2021-02-19 12:19:29 -08:00 committed by GitHub
parent 992e5bf01e
commit f28673e8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

BIN
apk/ai.comma.plus.offroad.apk (Stored with Git LFS)

Binary file not shown.

View File

@ -127,7 +127,7 @@ class Controls:
self.logged_comm_issue = False
self.sm['liveCalibration'].calStatus = Calibration.CALIBRATED
self.sm['deviceState'].freeSpacePercent = 1.
self.sm['deviceState'].freeSpacePercent = 100
self.sm['driverMonitoringState'].events = []
self.sm['driverMonitoringState'].awarenessStatus = 1.
self.sm['driverMonitoringState'].faceDetected = False
@ -163,7 +163,7 @@ class Controls:
self.events.add(EventName.lowBattery)
if self.sm['deviceState'].thermalStatus >= ThermalStatus.red:
self.events.add(EventName.overheat)
if self.sm['deviceState'].freeSpacePercent < 0.07:
if self.sm['deviceState'].freeSpacePercent < 7:
# under 7% of space free no enable allowed
self.events.add(EventName.outOfSpace)
if self.sm['deviceState'].memoryUsagePercent > 90:

View File

@ -465,7 +465,7 @@ def manager_thread():
while 1:
msg = messaging.recv_sock(device_state_sock, wait=True)
if msg.deviceState.freeSpacePercent < 0.05:
if msg.deviceState.freeSpacePercent < 5:
logger_dead = True
if msg.deviceState.started:

View File

@ -379,7 +379,7 @@ class Plant():
Plant.pandaState.send(pandaState.to_bytes())
deviceState = messaging.new_message('deviceState')
deviceState.deviceState.freeSpacePercent = 1.
deviceState.deviceState.freeSpacePercent = 100
deviceState.deviceState.batteryPercent = 100
Plant.deviceState.send(deviceState.to_bytes())

View File

@ -1 +1 @@
8f9ee10b8a1aeeac26c5b269c1137984b172b378
dab43741fd9aa6a18c65f00ec5f7b19e98f7fd92

View File

@ -245,7 +245,7 @@ def thermald_thread():
except Exception:
cloudlog.exception("Error getting network status")
msg.deviceState.freeSpacePercent = get_available_percent(default=100.0) / 100.0
msg.deviceState.freeSpacePercent = get_available_percent(default=100.0)
msg.deviceState.memoryUsagePercent = int(round(psutil.virtual_memory().percent))
msg.deviceState.cpuUsagePercent = int(round(psutil.cpu_percent()))
msg.deviceState.networkType = network_type
@ -347,7 +347,7 @@ def thermald_thread():
set_offroad_alert_if_changed("Offroad_PandaFirmwareMismatch", (not startup_conditions["fw_version_match"]))
# with 2% left, we killall, otherwise the phone will take a long time to boot
startup_conditions["free_space"] = msg.deviceState.freeSpacePercent > 0.02
startup_conditions["free_space"] = msg.deviceState.freeSpacePercent > 2
startup_conditions["completed_training"] = params.get("CompletedTrainingVersion") == training_version or \
(current_branch in ['dashcam', 'dashcam-staging'])
startup_conditions["not_driver_view"] = not params.get("IsDriverViewEnabled") == b"1"