Remove fallback on ADC sensor when ESC sensor fails
This commit is contained in:
parent
036c7d0c89
commit
7e26afddf1
|
@ -84,12 +84,17 @@ static void updateBatteryVoltage(void)
|
|||
}
|
||||
|
||||
#ifdef USE_ESC_SENSOR
|
||||
<<<<<<< 0a89e28c8e6e538d5b283fe9a389c481f24523fb
|
||||
if (feature(FEATURE_ESC_SENSOR) && batteryConfig->batteryMeterType == BATTERY_SENSOR_ESC) {
|
||||
vbatLatest = getEscSensorVbat();
|
||||
if (debugMode == DEBUG_BATTERY) {
|
||||
debug[0] = -1;
|
||||
}
|
||||
vbat = biquadFilterApply(&vBatFilter, vbatLatest);
|
||||
=======
|
||||
if (batteryConfig->batteryMeterType == BATTERY_SENSOR_ESC) {
|
||||
vbatSample = vbatLatest = getEscSensorVbat();
|
||||
>>>>>>> Remove fallback on ADC sensor when ESC sensor fails
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -291,8 +296,6 @@ void updateCurrentMeter(int32_t lastUpdateAt, rxConfig_t *rxConfig, uint16_t dea
|
|||
{
|
||||
amperage = getEscSensorCurrent();
|
||||
mAhDrawn = getEscSensorConsumption();
|
||||
|
||||
updateCurrentDrawn(lastUpdateAt);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -269,11 +269,10 @@ void escSensorProcess(timeUs_t currentTimeUs)
|
|||
|
||||
if (escTriggerLastTimestamp + 10000 < currentTimeMs) {
|
||||
// ESCs did not respond for 10 seconds
|
||||
// Disable ESC telemetry and fallback to onboard vbat sensor
|
||||
// Disable ESC telemetry and reset voltage and current to let the use know something is wrong
|
||||
freeEscSensorPort();
|
||||
escVbat = 0;
|
||||
escCurrent = 0;
|
||||
escConsumption = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue