fix.. dsp...

This commit is contained in:
ajouatom 2025-05-18 13:27:08 +09:00
parent a87f8b3376
commit 6e498648c8
2 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class ThermalZone:
class ThermalConfig: class ThermalConfig:
cpu: list[ThermalZone] | None = None cpu: list[ThermalZone] | None = None
gpu: list[ThermalZone] | None = None gpu: list[ThermalZone] | None = None
dsp: ThermalZone | None = None
pmic: list[ThermalZone] | None = None pmic: list[ThermalZone] | None = None
memory: ThermalZone | None = None memory: ThermalZone | None = None
intake: ThermalZone | None = None intake: ThermalZone | None = None
@ -130,6 +131,9 @@ class HardwareBase(ABC):
def get_thermal_config(self): def get_thermal_config(self):
return ThermalConfig() return ThermalConfig()
def set_display_power(self, on: bool):
pass
@abstractmethod @abstractmethod
def set_screen_brightness(self, percentage): def set_screen_brightness(self, percentage):
pass pass

View File

@ -340,6 +340,13 @@ class Tici(HardwareBase):
exhaust=exhaust, exhaust=exhaust,
case=case) 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): def set_screen_brightness(self, percentage):
try: try:
with open("/sys/class/backlight/panel0-backlight/max_brightness") as f: with open("/sys/class/backlight/panel0-backlight/max_brightness") as f: