only: fansDisabledByBoardStatus
This commit is contained in:
parent
5642d412de
commit
a690fc3ab5
|
@ -48,6 +48,10 @@ bool boardEnableSendWidebandInfo() {
|
|||
return megaEn.getLogicValue();
|
||||
}
|
||||
|
||||
bool fansDisabledByBoardStatus() {
|
||||
return !megaEn.getLogicValue();
|
||||
}
|
||||
|
||||
void hellenEnableEn() {
|
||||
megaEn.setValue(1);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
#include "bench_test.h"
|
||||
|
||||
__attribute__((weak)) bool fansDisabledByBoardStatus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FanController::getState(bool acActive, bool lastState) {
|
||||
auto clt = Sensor::get(SensorType::Clt);
|
||||
auto vss = Sensor::get(SensorType::VehicleSpeed);
|
||||
|
@ -32,6 +36,8 @@ bool FanController::getState(bool acActive, bool lastState) {
|
|||
} else if (disabledBySpeed) {
|
||||
// Inhibit while driving fast
|
||||
return false;
|
||||
} else if (fansDisabledByBoardStatus()) {
|
||||
return false;
|
||||
} else if (brokenClt) {
|
||||
// If CLT is broken, turn the fan on
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue