From 9e9e51f60505582f606a196950eb6588c1e79388 Mon Sep 17 00:00:00 2001 From: ajouatom Date: Sun, 18 May 2025 13:30:10 +0900 Subject: [PATCH] revert --- system/hardware/base.py | 4 ---- system/hardware/tici/hardware.py | 12 +++--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/system/hardware/base.py b/system/hardware/base.py index 90b42b2..c7c765f 100644 --- a/system/hardware/base.py +++ b/system/hardware/base.py @@ -33,7 +33,6 @@ class ThermalZone: class ThermalConfig: cpu: list[ThermalZone] | None = None gpu: list[ThermalZone] | None = None - dsp: ThermalZone | None = None pmic: list[ThermalZone] | None = None memory: ThermalZone | None = None intake: ThermalZone | None = None @@ -131,9 +130,6 @@ class HardwareBase(ABC): def get_thermal_config(self): return ThermalConfig() - def set_display_power(self, on: bool): - pass - @abstractmethod def set_screen_brightness(self, percentage): pass diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index 5a8e41b..15480ba 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -297,11 +297,13 @@ class Tici(HardwareBase): return None def get_modem_temperatures(self): + if self.get_device_type() == "mici": + return [] timeout = 0.2 # Default timeout is too short try: modem = self.get_modem() temps = modem.Command("AT+QTEMP", math.ceil(timeout), dbus_interface=MM_MODEM, timeout=timeout) - return list(filter(lambda t: t != 255, map(int, temps.split(' ')[1].split(',')))) + return list(map(int, temps.split(' ')[1].split(','))) except Exception: return [] @@ -333,20 +335,12 @@ class Tici(HardwareBase): return ThermalConfig(cpu=[ThermalZone(f"cpu{i}-silver-usr") for i in range(4)] + [ThermalZone(f"cpu{i}-gold-usr") for i in range(4)], gpu=[ThermalZone("gpu0-usr"), ThermalZone("gpu1-usr")], - dsp=ThermalZone("compute-hvx-usr"), memory=ThermalZone("ddr-usr"), pmic=[ThermalZone("pm8998_tz"), ThermalZone("pm8005_tz")], intake=intake, exhaust=exhaust, case=case) - def set_display_power(self, on): - try: - with open("/sys/class/backlight/panel0-backlight/bl_power", "w") as f: - f.write("0" if on else "4") - except Exception: - pass - def set_screen_brightness(self, percentage): try: with open("/sys/class/backlight/panel0-backlight/max_brightness") as f: