diff --git a/pyproject.toml b/pyproject.toml index 2b183c983e..db1b4195a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/release/files_common b/release/files_common index 19a93bc7da..8636959da5 100644 --- a/release/files_common +++ b/release/files_common @@ -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 diff --git a/selfdrive/manager/process_config.py b/selfdrive/manager/process_config.py index 5ea4b81b80..c2aa3b44e2 100644 --- a/selfdrive/manager/process_config.py +++ b/selfdrive/manager/process_config.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), diff --git a/selfdrive/test/test_onroad.py b/selfdrive/test/test_onroad.py index 53db737fc1..14f7773302 100755 --- a/selfdrive/test/test_onroad.py +++ b/selfdrive/test/test_onroad.py @@ -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, diff --git a/selfdrive/thermald/__init__.py b/system/thermald/__init__.py similarity index 100% rename from selfdrive/thermald/__init__.py rename to system/thermald/__init__.py diff --git a/selfdrive/thermald/fan_controller.py b/system/thermald/fan_controller.py similarity index 100% rename from selfdrive/thermald/fan_controller.py rename to system/thermald/fan_controller.py diff --git a/selfdrive/thermald/power_monitoring.py b/system/thermald/power_monitoring.py similarity index 100% rename from selfdrive/thermald/power_monitoring.py rename to system/thermald/power_monitoring.py diff --git a/selfdrive/thermald/tests/__init__.py b/system/thermald/tests/__init__.py similarity index 100% rename from selfdrive/thermald/tests/__init__.py rename to system/thermald/tests/__init__.py diff --git a/selfdrive/thermald/tests/test_fan_controller.py b/system/thermald/tests/test_fan_controller.py similarity index 96% rename from selfdrive/thermald/tests/test_fan_controller.py rename to system/thermald/tests/test_fan_controller.py index c2b1a64509..5c858132a2 100755 --- a/selfdrive/thermald/tests/test_fan_controller.py +++ b/system/thermald/tests/test_fan_controller.py @@ -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] diff --git a/selfdrive/thermald/tests/test_power_monitoring.py b/system/thermald/tests/test_power_monitoring.py similarity index 96% rename from selfdrive/thermald/tests/test_power_monitoring.py rename to system/thermald/tests/test_power_monitoring.py index f68191475b..0795a29c8f 100755 --- a/selfdrive/thermald/tests/test_power_monitoring.py +++ b/system/thermald/tests/test_power_monitoring.py @@ -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) diff --git a/selfdrive/thermald/thermald.py b/system/thermald/thermald.py similarity index 99% rename from selfdrive/thermald/thermald.py rename to system/thermald/thermald.py index d44ce6c18d..90f6494a26 100755 --- a/selfdrive/thermald/thermald.py +++ b/system/thermald/thermald.py @@ -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