diff --git a/apk/ai.comma.plus.offroad.apk b/apk/ai.comma.plus.offroad.apk index d3d2acc1..6af93e23 100644 --- a/apk/ai.comma.plus.offroad.apk +++ b/apk/ai.comma.plus.offroad.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9f629c0894ada01bdb7018899cec970ffa058948b25760ca840ebc3f4851767 -size 13710345 +oid sha256:34f8beca20214315be942f67aa3a6f2743174430da06b15706fbca610a9150b5 +size 13715186 diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 919a1886..58a9ac63 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -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: diff --git a/selfdrive/manager.py b/selfdrive/manager.py index e1db3c04..fbedaae9 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -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: diff --git a/selfdrive/test/longitudinal_maneuvers/plant.py b/selfdrive/test/longitudinal_maneuvers/plant.py index 01c90c27..a9fa576a 100755 --- a/selfdrive/test/longitudinal_maneuvers/plant.py +++ b/selfdrive/test/longitudinal_maneuvers/plant.py @@ -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()) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 4bf9b730..9a49875e 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -8f9ee10b8a1aeeac26c5b269c1137984b172b378 \ No newline at end of file +dab43741fd9aa6a18c65f00ec5f7b19e98f7fd92 \ No newline at end of file diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 92cac2af..e12be465 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -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"