diff --git a/cereal b/cereal index bbdf7973f1..0c929f74ce 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit bbdf7973f1c714c9ab43be924d50a581caaafe43 +Subproject commit 0c929f74ce2ca96ff95bd9c1b50b5840ccc4503d diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 6aa605682b..67aa81f52d 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -190,7 +190,7 @@ class Controls: return # Create events for battery, temperature, disk space, and memory - if self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError: + if EON and self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError: # at zero percent battery, while discharging, OP should not allowed self.events.add(EventName.lowBattery) if self.sm['deviceState'].thermalStatus >= ThermalStatus.red: diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index b2dfb67ff5..67cdf70306 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -69,7 +69,6 @@ def read_thermal(thermal_config): dat.deviceState.gpuTempC = [read_tz(z) / thermal_config.gpu[1] for z in thermal_config.gpu[0]] dat.deviceState.memoryTempC = read_tz(thermal_config.mem[0]) / thermal_config.mem[1] dat.deviceState.ambientTempC = read_tz(thermal_config.ambient[0]) / thermal_config.ambient[1] - dat.deviceState.batteryTempC = read_tz(thermal_config.bat[0]) / thermal_config.bat[1] return dat @@ -294,17 +293,8 @@ def thermald_thread(): msg.deviceState.networkInfo = network_info msg.deviceState.batteryPercent = HARDWARE.get_battery_capacity() - msg.deviceState.batteryStatus = HARDWARE.get_battery_status() msg.deviceState.batteryCurrent = HARDWARE.get_battery_current() - msg.deviceState.batteryVoltage = HARDWARE.get_battery_voltage() msg.deviceState.usbOnline = HARDWARE.get_usb_present() - - # Fake battery levels on uno for frame - if (not EON) or is_uno: - msg.deviceState.batteryPercent = 100 - msg.deviceState.batteryStatus = "Charging" - msg.deviceState.batteryTempC = 0 - current_filter.update(msg.deviceState.batteryCurrent / 1e6) max_comp_temp = temp_filter.update(