mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 20:03:53 +08:00
fix apk after cereal cleanup (#20098)
* actually a percent
* update apk
* update refs
old-commit-hash: f28673e8b5
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9f629c0894ada01bdb7018899cec970ffa058948b25760ca840ebc3f4851767
|
||||
size 13710345
|
||||
oid sha256:34f8beca20214315be942f67aa3a6f2743174430da06b15706fbca610a9150b5
|
||||
size 13715186
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
8f9ee10b8a1aeeac26c5b269c1137984b172b378
|
||||
dab43741fd9aa6a18c65f00ec5f7b19e98f7fd92
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user