parent
abc804da8a
commit
de22b4c09b
|
@ -201,11 +201,14 @@ static bool isInitialized = false;
|
|||
void Pt2001::initIfNeeded() {
|
||||
if (Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE) < LOW_VBATT) {
|
||||
isInitialized = false;
|
||||
efiPrintf("unhappy mc33 due to battery voltage");
|
||||
} else {
|
||||
if (!isInitialized) {
|
||||
isInitialized = restart();
|
||||
if (isInitialized) {
|
||||
efiPrintf("happy mc33/PT2001!");
|
||||
} else {
|
||||
efiPrintf("unhappy mc33");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue