reducing code duplication

This commit is contained in:
rusefi 2024-05-08 21:45:11 -04:00
parent 9a85ac9922
commit cf2535f340
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ void MainRelayController::onSlowCallback() {
// key-on is usually a bit smaller voltage than main relay but sometimes even 1v off!
hasIgnitionVoltage = efiReadPin(engineConfiguration->ignitionKeyDigitalPin);
} else {
hasIgnitionVoltage = Sensor::getOrZero(SensorType::BatteryVoltage) > 5;
hasIgnitionVoltage = isIgnVoltage();
}
if (hasIgnitionVoltage) {

View File

@ -19,6 +19,7 @@
#include "thermistors.h"
#include "adc_inputs.h"
// see also: isIgnVoltage()
#define LOW_VBATT 7
void initSensors();