|
|
@ -528,9 +528,6 @@ void peripheral_control_thread(Panda *panda, bool no_fan_control) { |
|
|
|
cnt++; |
|
|
|
cnt++; |
|
|
|
sm.update(1000); // TODO: what happens if EINTR is sent while in sm.update?
|
|
|
|
sm.update(1000); // TODO: what happens if EINTR is sent while in sm.update?
|
|
|
|
|
|
|
|
|
|
|
|
// Other pandas don't have fan/IR to control
|
|
|
|
|
|
|
|
if (panda->hw_type != cereal::PandaState::PandaType::UNO && panda->hw_type != cereal::PandaState::PandaType::DOS) continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sm.updated("deviceState") && !no_fan_control) { |
|
|
|
if (sm.updated("deviceState") && !no_fan_control) { |
|
|
|
// Fan speed
|
|
|
|
// Fan speed
|
|
|
|
uint16_t fan_speed = sm["deviceState"].getDeviceState().getFanSpeedPercentDesired(); |
|
|
|
uint16_t fan_speed = sm["deviceState"].getDeviceState().getFanSpeedPercentDesired(); |
|
|
|