mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 07:15:18 +03:00
Fix incorrect merge in battery_unittest
batteryConfig initialization was merged twice, removing one version
This commit is contained in:
parent
44b36107a6
commit
f1a0972002
1 changed files with 2 additions and 11 deletions
|
@ -37,10 +37,9 @@ typedef struct batteryAdcToVoltageExpectation_s {
|
|||
|
||||
TEST(BatteryTest, BatteryADCToVoltage)
|
||||
{
|
||||
// given
|
||||
|
||||
// batteryInit() reads a bunch of fields including vbatscale, so set up the config with useful initial values:
|
||||
batteryConfig_t batteryConfig = {
|
||||
.vbatscale = 110,
|
||||
.vbatscale = VBAT_SCALE_DEFAULT,
|
||||
.vbatmaxcellvoltage = 43,
|
||||
.vbatmincellvoltage = 33,
|
||||
.vbatwarningcellvoltage = 35,
|
||||
|
@ -51,14 +50,6 @@ TEST(BatteryTest, BatteryADCToVoltage)
|
|||
.batteryCapacity = 2200,
|
||||
};
|
||||
|
||||
// batteryInit() reads a bunch of fields including vbatscale, so set up the config with useful initial values:
|
||||
memset(&batteryConfig, 0, sizeof(batteryConfig));
|
||||
|
||||
batteryConfig.vbatmaxcellvoltage = 43;
|
||||
batteryConfig.vbatmincellvoltage = 33;
|
||||
batteryConfig.vbatwarningcellvoltage = 35;
|
||||
batteryConfig.vbatscale = VBAT_SCALE_DEFAULT;
|
||||
|
||||
batteryInit(&batteryConfig);
|
||||
|
||||
batteryAdcToVoltageExpectation_t batteryAdcToVoltageExpectations[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue