IQ.Pilot Release Commit @ d2ce8a8

This commit is contained in:
IQ.Lvbs CI [bot]
2026-08-28 08:35:52 -05:00
parent 9206164707
commit ee1dca77c7
210 changed files with 19726 additions and 455 deletions

View File

@@ -3,24 +3,13 @@ import numpy as np
class FanController:
def __init__(self) -> None:
self.last_ignition = False
def update(self, cur_temp: float, ignition: bool, max_cool: bool = False) -> int:
if max_cool:
self.last_ignition = ignition
return 100
if cur_temp < 70.0:
fan_pwr_out = 0
elif cur_temp > 85.0:
fan_pwr_out = 100
else:
# 70°C → 0%, 85°C → 80%, target 75°C
fan_pwr_out = int(np.interp(cur_temp, [70.0, 85.0], [0, 80]))
fan_pwr_out = int(np.interp(cur_temp, [70.0, 85.0, 90.0], [0, 80, 100]))
if not ignition:
fan_pwr_out = min(fan_pwr_out, 30)
self.last_ignition = ignition
return fan_pwr_out