thermald: move to system/ (#32494)

* thermald: move to system/

* fix path

* revert
old-commit-hash: b2cf9b35f68061587fd6ab7a94a58f7b433b2da2
This commit is contained in:
Adeeb Shihadeh
2024-05-20 22:51:29 -07:00
committed by GitHub
parent 7a3e454d27
commit 14e7c7d260
11 changed files with 12 additions and 12 deletions

View File

@@ -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",

View File

@@ -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

View File

@@ -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),

View File

@@ -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,

View File

@@ -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]

View File

@@ -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)

View File

@@ -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