mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Cleaned up parameter group handling.
Fixed missing include.
This commit is contained in:
parent
9eb83d1e5f
commit
09d396c05c
41 changed files with 125 additions and 157 deletions
|
@ -133,11 +133,19 @@ void currentMeterADCInit(void)
|
|||
|
||||
void currentMeterADCRefresh(int32_t lastUpdateAt)
|
||||
{
|
||||
#ifdef USE_ADC
|
||||
const uint16_t iBatSample = adcGetChannel(ADC_CURRENT);
|
||||
currentMeterADCState.amperageLatest = currentMeterADCToCentiamps(iBatSample);
|
||||
currentMeterADCState.amperage = currentMeterADCToCentiamps(biquadFilterApply(&adciBatFilter, iBatSample));
|
||||
|
||||
updateCurrentmAhDrawnState(¤tMeterADCState.mahDrawnState, currentMeterADCState.amperageLatest, lastUpdateAt);
|
||||
#else
|
||||
UNUSED(lastUpdateAt);
|
||||
UNUSED(currentMeterADCToCentiamps);
|
||||
|
||||
currentMeterADCState.amperageLatest = 0;
|
||||
currentMeterADCState.amperage = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void currentMeterADCRead(currentMeter_t *meter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue