fanSpeedRpmDesired -> fanSpeedPercentDesired
parent
6264b5bb3b
commit
4ace476f14
2
cereal
2
cereal
|
@ -1 +1 @@
|
|||
Subproject commit a903bc4acd1d1fee791e044bcf9bc802fbe13f15
|
||||
Subproject commit e1b16fd9451ce2f9f6ebd0d24cf414fac0b96f96
|
|
@ -426,7 +426,7 @@ void hardware_control_thread() {
|
|||
if (panda->hw_type != cereal::HealthData::PandaType::UNO && panda->hw_type != cereal::HealthData::PandaType::DOS) continue;
|
||||
if (sm.updated("thermal")){
|
||||
// Fan speed
|
||||
uint16_t fan_speed = sm["thermal"].getThermal().getFanSpeedRpmDesired();
|
||||
uint16_t fan_speed = sm["thermal"].getThermal().getFanSpeedPercentDesired();
|
||||
if (fan_speed != prev_fan_speed || cnt % 100 == 0){
|
||||
panda->set_fan_speed(fan_speed);
|
||||
prev_fan_speed = fan_speed;
|
||||
|
|
|
@ -171,7 +171,7 @@ class Controls:
|
|||
|
||||
# Alert if fan isn't spinning for 5 seconds
|
||||
if self.sm['health'].pandaType in [PandaType.uno, PandaType.dos]:
|
||||
if self.sm['health'].fanSpeedRpm == 0 and self.sm['thermal'].fanSpeedRpmDesired > 50:
|
||||
if self.sm['health'].fanSpeedRpm == 0 and self.sm['thermal'].fanSpeedPercentDesired > 50:
|
||||
if (self.sm.frame - self.last_functional_fan_frame) * DT_CTRL > 5.0:
|
||||
self.events.add(EventName.fanMalfunction)
|
||||
else:
|
||||
|
|
|
@ -271,7 +271,7 @@ def thermald_thread():
|
|||
|
||||
if handle_fan is not None:
|
||||
fan_speed = handle_fan(max_cpu_temp, bat_temp, fan_speed, startup_conditions["ignition"])
|
||||
msg.thermal.fanSpeedRpmDesired = fan_speed
|
||||
msg.thermal.fanSpeedPercentDesired = fan_speed
|
||||
|
||||
# If device is offroad we want to cool down before going onroad
|
||||
# since going onroad increases load and can make temps go over 107
|
||||
|
|
Loading…
Reference in New Issue