Skip to content

Commit

Permalink
remove deviceState.ambientTempC (#31533)
Browse files Browse the repository at this point in the history
old-commit-hash: 0b4d08f
  • Loading branch information
adeebshihadeh authored Feb 21, 2024
1 parent f5beedf commit 5e81beb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cereal
2 changes: 0 additions & 2 deletions selfdrive/thermald/thermald.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def read_thermal(thermal_config):
dat.deviceState.cpuTempC = [read_tz(z) / thermal_config.cpu[1] for z in thermal_config.cpu[0]]
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.pmicTempC = [read_tz(z) / thermal_config.pmic[1] for z in thermal_config.pmic[0]]
return dat

Expand Down Expand Up @@ -412,7 +411,6 @@ def thermald_thread(end_event, hw_queue) -> None:
for i, temp in enumerate(msg.deviceState.gpuTempC):
statlog.gauge(f"gpu{i}_temperature", temp)
statlog.gauge("memory_temperature", msg.deviceState.memoryTempC)
statlog.gauge("ambient_temperature", msg.deviceState.ambientTempC)
for i, temp in enumerate(msg.deviceState.pmicTempC):
statlog.gauge(f"pmic{i}_temperature", temp)
for i, temp in enumerate(last_hw_state.nvme_temps):
Expand Down
2 changes: 1 addition & 1 deletion system/hardware/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from cereal import log

ThermalConfig = namedtuple('ThermalConfig', ['cpu', 'gpu', 'mem', 'bat', 'ambient', 'pmic'])
ThermalConfig = namedtuple('ThermalConfig', ['cpu', 'gpu', 'mem', 'bat', 'pmic'])
NetworkType = log.DeviceState.NetworkType


Expand Down
2 changes: 1 addition & 1 deletion system/hardware/pc/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def shutdown(self):
print("SHUTDOWN!")

def get_thermal_config(self):
return ThermalConfig(cpu=((None,), 1), gpu=((None,), 1), mem=(None, 1), bat=(None, 1), ambient=(None, 1), pmic=((None,), 1))
return ThermalConfig(cpu=((None,), 1), gpu=((None,), 1), mem=(None, 1), bat=(None, 1), pmic=((None,), 1))

def set_screen_brightness(self, percentage):
pass
Expand Down
1 change: 0 additions & 1 deletion system/hardware/tici/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ def get_thermal_config(self):
gpu=(("gpu0-usr", "gpu1-usr"), 1000),
mem=("ddr-usr", 1000),
bat=(None, 1),
ambient=("xo-therm-adc", 1000),
pmic=(("pm8998_tz", "pm8005_tz"), 1000))

def set_screen_brightness(self, percentage):
Expand Down

0 comments on commit 5e81beb

Please sign in to comment.