Skip to content

Commit

Permalink
Merge pull request #605 from ledvinap/fix-batterytest-merge
Browse files Browse the repository at this point in the history
Fix incorrect merge in battery_unittest
  • Loading branch information
hydra committed Mar 11, 2015
2 parents 4746b33 + f1a0972 commit 2c79d77
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/test/unit/battery_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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[] = {
Expand Down

0 comments on commit 2c79d77

Please sign in to comment.