1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-26 15:54:15 +01:00

LP-550 Move batteryEnabled to local variable

This commit is contained in:
Laurent Lalanne 2017-10-29 13:43:18 +01:00
parent b469e9b1ba
commit 8c9cd5d0ec

View File

@ -61,10 +61,6 @@
// Time since power on the cells detection is active // Time since power on the cells detection is active
#define DETECTION_TIMEFRAME 60000 #define DETECTION_TIMEFRAME 60000
// Private types
// Private variables
static bool batteryEnabled = false;
#ifndef PIOS_ADC_VOLTAGE_PIN #ifndef PIOS_ADC_VOLTAGE_PIN
#define PIOS_ADC_VOLTAGE_PIN -1 #define PIOS_ADC_VOLTAGE_PIN -1
@ -92,6 +88,8 @@ static void GetNbCells(const FlightBatterySettingsData *batterySettings, FlightB
*/ */
int32_t BatteryInitialize(void) int32_t BatteryInitialize(void)
{ {
bool batteryEnabled;
#ifdef MODULE_BATTERY_BUILTIN #ifdef MODULE_BATTERY_BUILTIN
batteryEnabled = true; batteryEnabled = true;
#else #else