Skip to content

Commit 8c9cd5d

Browse files
committed
LP-550 Move batteryEnabled to local variable
1 parent b469e9b commit 8c9cd5d

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

flight/modules/Battery/battery.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@
5757
//
5858
// Configuration
5959
//
60-
#define SAMPLE_PERIOD_MS 500
60+
#define SAMPLE_PERIOD_MS 500
6161

6262
// Time since power on the cells detection is active
63-
#define DETECTION_TIMEFRAME 60000
64-
// Private types
65-
66-
// Private variables
67-
static bool batteryEnabled = false;
63+
#define DETECTION_TIMEFRAME 60000
6864

6965
#ifndef PIOS_ADC_VOLTAGE_PIN
7066
#define PIOS_ADC_VOLTAGE_PIN -1
@@ -92,6 +88,8 @@ static void GetNbCells(const FlightBatterySettingsData *batterySettings, FlightB
9288
*/
9389
int32_t BatteryInitialize(void)
9490
{
91+
bool batteryEnabled;
92+
9593
#ifdef MODULE_BATTERY_BUILTIN
9694
batteryEnabled = true;
9795
#else

0 commit comments

Comments
 (0)