Index: firmware/App/Monitors/Battery.c =================================================================== diff -u -re353dd386442059f6a658804e08909deec511292 -r128001070f25543484b1232a38dc9100498e1a04 --- firmware/App/Monitors/Battery.c (.../Battery.c) (revision e353dd386442059f6a658804e08909deec511292) +++ firmware/App/Monitors/Battery.c (.../Battery.c) (revision 128001070f25543484b1232a38dc9100498e1a04) @@ -97,6 +97,8 @@ // Initialize persistent alarm for battery pack status error initPersistentAlarm( ALARM_ID_TD_BATTERY_PACK_ERROR_DETECTED, 0, BATT_STATUS_ERROR_PERSIST_MS ); + // Initialize persistent alarm for battery charger status error + initPersistentAlarm( ALARM_ID_TD_BATTERY_CHARGER_ERROR_DETECTED, 0U, BATT_STATUS_ERROR_PERSIST_MS ); // Initialize bad message CRC time windowed count initTimeWindowedCount( TIME_WINDOWED_COUNT_BATT_COMM_ERROR, BATTERY_COMM_FAULT_COUNT, BATTERY_COMM_FAULT_TIMER ); } @@ -221,10 +223,6 @@ { U32 responseData; - // Increment the position in the enum. Starting value is BEGINNING_OF_LIST (0), so on the first - // cycle through this function it will be set to the first valid position (1) - currentBmValue += 1; - switch( currentBmValue ) { case BATTERY_PACK_REMAINING_CAPACITY: @@ -346,6 +344,11 @@ currentBmValue ); break; } + currentBmValue++; + if( currentBmValue > BATTERY_END_OF_LIST_TIME_TO_PUBLISH ) + { + currentBmValue = BEGINNING_OF_LIST; + } } /*********************************************************************//**