This function switches the multiplexer to the current display, retrieves the recent current sum and shows the value with the LED bar graph. In case of a current warning or error condition some LEDs will be flashing.
Definition at line 252 of file leds.c. References ALL_LEDS_OFF, COND_CURR_ERR, COND_CURR_WARN, COND_OK, COND_TEMP_ERR, COND_TEMP_WARN, COND_VOLT_ERR, COND_VOLT_WARN, CURR_0A, CURR_10A, CURR_15A, CURR_20A, CURR_5A, current_GetAvg(), LED1_OFF, LED1_ON, LED2_OFF, LED2_ON, LED3_OFF, LED3_ON, LED4_OFF, LED4_ON, LED5_OFF, LED5_ON, MUX_CURR, safety_GetCondition(), and timer_GetSystemTime(). Referenced by ISR(). { UINT16 u16Help; u16Help = current_GetAvg(); MUX_CURR(); if(safety_GetCondition() != COND_OK) { if((timer_GetSystemTime() & 256UL) == 0UL) { if ((safety_GetCondition() & COND_VOLT_WARN) != 0U) { /* LED5 indicates a voltage warning */ LED5_ON(); } if ((safety_GetCondition() & COND_VOLT_ERR) != 0U) { /* LED5 will also be flashing on voltage error */ LED5_ON(); } if ((safety_GetCondition() & COND_CURR_WARN) != 0U) { /* LED1 indicates a current warning */ LED5_ON(); } if ((safety_GetCondition() & COND_CURR_ERR) != 0U) { /* LED2 indicates a current error */ LED2_ON(); } if ((safety_GetCondition() & COND_TEMP_WARN) != 0U) { /* LED3 indicates a temperature warning */ LED3_ON(); } if ((safety_GetCondition() & COND_TEMP_ERR) != 0U) { /* LED4 indicates a temperature error */ LED4_ON(); } } else { ALL_LEDS_OFF(); } } else { if(u16Help >= CURR_20A) { LED5_ON(); } else { LED5_OFF(); } if(u16Help >= CURR_15A) { LED4_ON(); } else { LED4_OFF(); } if(u16Help >= CURR_10A) { LED3_ON(); } else { LED3_OFF(); } if(u16Help >= CURR_5A) { LED2_ON(); } else { LED2_OFF(); } if(u16Help > CURR_0A) { LED1_ON(); } else { LED1_OFF(); } } }
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() |