|
|
@ -10,7 +10,7 @@ from pathlib import Path |
|
|
|
|
|
|
|
|
|
|
|
from cereal import log |
|
|
|
from cereal import log |
|
|
|
from openpilot.common.gpio import gpio_set, gpio_init, get_irqs_for_action |
|
|
|
from openpilot.common.gpio import gpio_set, gpio_init, get_irqs_for_action |
|
|
|
from openpilot.system.hardware.base import HardwareBase, ThermalConfig |
|
|
|
from openpilot.system.hardware.base import HardwareBase, ThermalConfig, ThermalZone |
|
|
|
from openpilot.system.hardware.tici import iwlist |
|
|
|
from openpilot.system.hardware.tici import iwlist |
|
|
|
from openpilot.system.hardware.tici.pins import GPIO |
|
|
|
from openpilot.system.hardware.tici.pins import GPIO |
|
|
|
from openpilot.system.hardware.tici.amplifier import Amplifier |
|
|
|
from openpilot.system.hardware.tici.amplifier import Amplifier |
|
|
@ -323,17 +323,19 @@ class Tici(HardwareBase): |
|
|
|
os.system("sudo poweroff") |
|
|
|
os.system("sudo poweroff") |
|
|
|
|
|
|
|
|
|
|
|
def get_thermal_config(self): |
|
|
|
def get_thermal_config(self): |
|
|
|
intake, exhaust = (None, 1), (None, 1) |
|
|
|
intake, exhaust, case = None, None, None |
|
|
|
if self.get_device_type() == "mici": |
|
|
|
if self.get_device_type() == "mici": |
|
|
|
intake = ("intake", 1000) |
|
|
|
case = ThermalZone("case") |
|
|
|
exhaust = ("exhaust", 1000) |
|
|
|
intake = ThermalZone("intake") |
|
|
|
return ThermalConfig(cpu=([f"cpu{i}-silver-usr" for i in range(4)] + |
|
|
|
exhaust = ThermalZone("exhaust") |
|
|
|
[f"cpu{i}-gold-usr" for i in range(4)], 1000), |
|
|
|
return ThermalConfig(cpu=[ThermalZone(f"cpu{i}-silver-usr") for i in range(4)] + |
|
|
|
gpu=(("gpu0-usr", "gpu1-usr"), 1000), |
|
|
|
[ThermalZone(f"cpu{i}-gold-usr") for i in range(4)], |
|
|
|
mem=("ddr-usr", 1000), |
|
|
|
gpu=[ThermalZone("gpu0-usr"), ThermalZone("gpu1-usr")], |
|
|
|
pmic=(("pm8998_tz", "pm8005_tz"), 1000), |
|
|
|
memory=ThermalZone("ddr-usr"), |
|
|
|
|
|
|
|
pmic=[ThermalZone("pm8998_tz"), ThermalZone("pm8005_tz")], |
|
|
|
intake=intake, |
|
|
|
intake=intake, |
|
|
|
exhaust=exhaust) |
|
|
|
exhaust=exhaust, |
|
|
|
|
|
|
|
case=case) |
|
|
|
|
|
|
|
|
|
|
|
def set_screen_brightness(self, percentage): |
|
|
|
def set_screen_brightness(self, percentage): |
|
|
|
try: |
|
|
|
try: |
|
|
|