vBatt -> SensorType::vBatt #2260

This commit is contained in:
rusefillc 2021-03-11 22:44:59 -05:00
parent b8de6388cf
commit c7d8997a3a
3 changed files with 4 additions and 2 deletions

View File

@ -288,7 +288,7 @@ void Engine::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
fuelLevelVoltage);
}
sensors.vBatt = Sensor::get(SensorType::BatteryVoltage).value_or(12);
sensors.vBatt = Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE);
#if (BOARD_TLE8888_COUNT > 0)
// nasty value injection into C driver which would not be able to access Engine class

View File

@ -36,7 +36,7 @@ public:
Accelerometer accelerometer;
// todo: remove this variable, replace with Sensor::get(SensorType::vbatt).value_or(VBAT_FALLBACK_VALUE)
// todo: remove this variable, replace with Sensor::get(SensorType::BatteryVoltage).value_or(VBAT_FALLBACK_VALUE)
// todo: https://github.com/rusefi/rusefi/issues/2260
float vBatt = 0;
/**

View File

@ -8,6 +8,8 @@
#pragma once
#define VBAT_FALLBACK_VALUE 12
/**
**************************************
* SEE sensor.h ON HOW TO ADD NEW SENSOR TYPES