Skip to content

Commit

Permalink
Allow configuration for ibat_lpf_period using DEFAULT_IBAT_LPF_PERIOD…
Browse files Browse the repository at this point in the history
… define (betaflight#13903)

Allow configuration for ibat_lpf_period
  • Loading branch information
haslinghuis authored Oct 23, 2024
1 parent 715c167 commit 2cc63b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/sensors/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ static float wattHoursDrawn;
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_NONE
#endif

#ifndef DEFAULT_IBAT_LPF_PERIOD
#define DEFAULT_IBAT_LPF_PERIOD 10
#endif

PG_REGISTER_WITH_RESET_TEMPLATE(batteryConfig_t, batteryConfig, PG_BATTERY_CONFIG, 3);

PG_RESET_TEMPLATE(batteryConfig_t, batteryConfig,
Expand Down Expand Up @@ -129,7 +133,7 @@ PG_RESET_TEMPLATE(batteryConfig_t, batteryConfig,

.vbatDisplayLpfPeriod = 30,
.vbatSagLpfPeriod = 2,
.ibatLpfPeriod = 10,
.ibatLpfPeriod = DEFAULT_IBAT_LPF_PERIOD,
.vbatDurationForWarning = 0,
.vbatDurationForCritical = 0,
);
Expand Down

0 comments on commit 2cc63b6

Please sign in to comment.