From 2123a12507619b0c35c2e3afd8ca4ee79bb69b67 Mon Sep 17 00:00:00 2001 From: luckylz2git <8618993@qq.com> Date: Wed, 16 Oct 2024 11:39:12 +0800 Subject: [PATCH] fan_pwr_out 65% --- selfdrive/thermald/fan_controller.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selfdrive/thermald/fan_controller.py b/selfdrive/thermald/fan_controller.py index 19c3292c..6609e100 100755 --- a/selfdrive/thermald/fan_controller.py +++ b/selfdrive/thermald/fan_controller.py @@ -28,10 +28,13 @@ class TiciFanController(BaseFanController): self.controller.reset() error = 70 - cur_temp - fan_pwr_out = -int(self.controller.update( - error=error, - feedforward=interp(cur_temp, [60.0, 100.0], [0, -100]) - )) + # fan_pwr_out = -int(self.controller.update( + # error=error, + # feedforward=interp(cur_temp, [60.0, 100.0], [0, -100]) + # )) + fan_pwr_out = int(interp(cur_temp, [60.0, 80.0], [0, 65])) + # 确保风扇功率在 0 到 65 之间 + fan_pwr_out = max(0, min(65, fan_pwr_out)) self.last_ignition = ignition return fan_pwr_out