Index: firmware/App/Drivers/Battery.c =================================================================== diff -u -r88dfa298eb85a9153d0bf216916308337096c835 -rfbb66032e095655b8857834bb4537539928ffadd --- firmware/App/Drivers/Battery.c (.../Battery.c) (revision 88dfa298eb85a9153d0bf216916308337096c835) +++ firmware/App/Drivers/Battery.c (.../Battery.c) (revision fbb66032e095655b8857834bb4537539928ffadd) @@ -83,7 +83,7 @@ static const U32 BATT_STATUS_ERROR_PERSIST_MS = ( 5 * MS_PER_SECOND ); // ENUM of battery management values for iterating -typedef enum BatteryManagementEnum +typedef enum BatteryManagementEnum // SN - Add "_" between words in enums with prefix BATTERY_PACK_ or BATTERY_CHARGER_. { BEGINNING_OF_LIST = 0, REMAININGCAPACITY1 = BEGINNING_OF_LIST, @@ -133,6 +133,7 @@ static OVERRIDE_F32_T batteryRemCapacity_mAh = { 0.0, 0.0, 0.0, 0 }; ///< Battery pack remaining capacity (in mAh). static U32 lastBatteryMonitorTime = 0; ///< Previous battery monitor time. +static U32 lastBatteryGetDataTime = 0; ///< Previous battery data get time. static U32 lostACPowerPersistentCount = 0; ///< Persistent count for AC power lost alarm. static U32 commFaultPersistentCount = 0; ///< Persistence count for battery comm fault. @@ -167,6 +168,7 @@ lastBatteryMonitorTime = 0; lostACPowerPersistentCount = 0; commFaultPersistentCount = 0; + lastBatteryGetDataTime = 0; current_BM_value = BEGINNING_OF_LIST; lastBatteryGetDataTime = getMSTimerCount(); @@ -594,6 +596,7 @@ break; case BATTERY_CHARGER_STATUS: +/* TODO: Uncomment when battery charger is installed. if ( TRUE == getBatteryData( BATTERY_CHARGER_SLAVE_ADDRESS, BATTERY_CHARGER_STATUS_CMD, &BatteryLoggingData.BatteryChargerStatus ) ) { if ( 0 == ( BatteryLoggingData.BatteryChargerStatus & BATTERY_CHARGER_STATUS_AC_PRESENT_MASK ) ) @@ -611,7 +614,8 @@ lostACPowerPersistentCount = 0; } } - +*/ + break; case END_OF_LIST: current_BM_value = BEGINNING_OF_LIST; publishBatteryManagementData();