thermald: move to system/ (#32494)

* thermald: move to system/

* fix path

* revert
old-commit-hash: b2cf9b35f6
pull/32103/head
Adeeb Shihadeh 11 months ago committed by GitHub
parent 7a3e454d27
commit 14e7c7d260
  1. 2
      pyproject.toml
  2. 6
      release/files_common
  3. 2
      selfdrive/manager/process_config.py
  4. 2
      selfdrive/test/test_onroad.py
  5. 0
      system/thermald/__init__.py
  6. 0
      system/thermald/fan_controller.py
  7. 0
      system/thermald/power_monitoring.py
  8. 0
      system/thermald/tests/__init__.py
  9. 2
      system/thermald/tests/test_fan_controller.py
  10. 6
      system/thermald/tests/test_power_monitoring.py
  11. 4
      system/thermald/thermald.py

@ -26,10 +26,10 @@ testpaths = [
"selfdrive/locationd",
"selfdrive/monitoring",
"selfdrive/navd/tests",
"selfdrive/thermald",
"selfdrive/test/longitudinal_maneuvers",
"selfdrive/test/process_replay/test_fuzzy.py",
"selfdrive/updated",
"system/thermald",
"system/athena",
"system/camerad",
"system/hardware/tici",

@ -253,9 +253,9 @@ system/webrtc/schema.py
system/webrtc/device/audio.py
system/webrtc/device/video.py
selfdrive/thermald/thermald.py
selfdrive/thermald/power_monitoring.py
selfdrive/thermald/fan_controller.py
system/thermald/thermald.py
system/thermald/power_monitoring.py
system/thermald/fan_controller.py
selfdrive/test/__init__.py
selfdrive/test/fuzzy_generation.py

@ -75,7 +75,7 @@ procs = [
PythonProcess("pigeond", "system.ubloxd.pigeond", ublox, enabled=TICI),
PythonProcess("plannerd", "selfdrive.controls.plannerd", only_onroad),
PythonProcess("radard", "selfdrive.controls.radard", only_onroad),
PythonProcess("thermald", "selfdrive.thermald.thermald", always_run),
PythonProcess("thermald", "system.thermald.thermald", always_run),
PythonProcess("tombstoned", "system.tombstoned", always_run, enabled=not PC),
PythonProcess("updated", "selfdrive.updated.updated", only_offroad, enabled=not PC),
PythonProcess("uploader", "system.loggerd.uploader", always_run),

@ -47,7 +47,7 @@ PROCS = {
"selfdrive.controls.radard": 7.0,
"selfdrive.modeld.modeld": 13.0,
"selfdrive.modeld.dmonitoringmodeld": 8.0,
"selfdrive.thermald.thermald": 3.87,
"system.thermald.thermald": 3.87,
"selfdrive.locationd.calibrationd": 2.0,
"selfdrive.locationd.torqued": 5.0,
"selfdrive.ui.soundd": 3.5,

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import pytest
from openpilot.selfdrive.thermald.fan_controller import TiciFanController
from openpilot.system.thermald.fan_controller import TiciFanController
ALL_CONTROLLERS = [TiciFanController]

@ -2,7 +2,7 @@
import pytest
from openpilot.common.params import Params
from openpilot.selfdrive.thermald.power_monitoring import PowerMonitoring, CAR_BATTERY_CAPACITY_uWh, \
from openpilot.system.thermald.power_monitoring import PowerMonitoring, CAR_BATTERY_CAPACITY_uWh, \
CAR_CHARGING_RATE_W, VBATT_PAUSE_CHARGING, DELAY_SHUTDOWN_TIME_S
# Create fake time
@ -18,9 +18,9 @@ VOLTAGE_BELOW_PAUSE_CHARGING = (VBATT_PAUSE_CHARGING - 1) * 1e3
def pm_patch(mocker, name, value, constant=False):
if constant:
mocker.patch(f"openpilot.selfdrive.thermald.power_monitoring.{name}", value)
mocker.patch(f"openpilot.system.thermald.power_monitoring.{name}", value)
else:
mocker.patch(f"openpilot.selfdrive.thermald.power_monitoring.{name}", return_value=value)
mocker.patch(f"openpilot.system.thermald.power_monitoring.{name}", return_value=value)
@pytest.fixture(autouse=True)

@ -21,8 +21,8 @@ from openpilot.system.hardware import HARDWARE, TICI, AGNOS
from openpilot.system.loggerd.config import get_available_percent
from openpilot.system.statsd import statlog
from openpilot.common.swaglog import cloudlog
from openpilot.selfdrive.thermald.power_monitoring import PowerMonitoring
from openpilot.selfdrive.thermald.fan_controller import TiciFanController
from openpilot.system.thermald.power_monitoring import PowerMonitoring
from openpilot.system.thermald.fan_controller import TiciFanController
from openpilot.system.version import terms_version, training_version
ThermalStatus = log.DeviceState.ThermalStatus
Loading…
Cancel
Save