better logging

only:mre_f4
This commit is contained in:
rusefillc 2023-12-12 18:24:42 -05:00
parent abc804da8a
commit de22b4c09b
1 changed files with 3 additions and 0 deletions

View File

@ -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");
}
}
}