Enable battery task when ESC sensor is available
This commit is contained in:
parent
b53cbbefc3
commit
1561481e52
|
@ -109,7 +109,7 @@ static void taskHandleSerial(timeUs_t currentTimeUs)
|
|||
|
||||
static void taskUpdateBattery(timeUs_t currentTimeUs)
|
||||
{
|
||||
#ifdef USE_ADC
|
||||
#if defined(USE_ADC) || defined(USE_ESC_SENSOR)
|
||||
static uint32_t vbatLastServiced = 0;
|
||||
if (feature(FEATURE_VBAT) || feature(FEATURE_ESC_SENSOR)) {
|
||||
if (cmp32(currentTimeUs, vbatLastServiced) >= VBATINTERVAL) {
|
||||
|
|
|
@ -295,6 +295,8 @@ void updateCurrentMeter(int32_t lastUpdateAt, rxConfig_t *rxConfig, uint16_t dea
|
|||
updateCurrentDrawn(lastUpdateAt);
|
||||
}
|
||||
#endif
|
||||
|
||||
break;
|
||||
case CURRENT_SENSOR_NONE:
|
||||
amperage = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue