This function switches the multiplexer to the voltage display, retrieves the average battery voltage and shows the value with the LED bar graph. In case of a voltage error condition all (voltage) LEDs will be flashing.
Definition at line 168 of file leds.c. References ALL_LEDS_OFF, ALL_LEDS_ON, COND_VOLT_ERR, LED1_OFF, LED1_ON, LED2_OFF, LED2_ON, LED3_OFF, LED3_ON, LED4_OFF, LED4_ON, LED5_OFF, LED5_ON, MUX_VOLT, safety_GetCondition(), timer_GetSystemTime(), VOLT_10V, VOLT_10V5, VOLT_11V, VOLT_11V5, VOLT_12V, and voltage_GetAvg(). Referenced by ISR(). {
UINT16 u16Help;
u16Help = voltage_GetAvg();
MUX_VOLT();
if((safety_GetCondition() & COND_VOLT_ERR) != 0U)
{
/* all LED flashing in case of a voltage error condidtion */
if((timer_GetSystemTime() & 256UL) == 0UL)
{
ALL_LEDS_ON();
}
else
{
ALL_LEDS_OFF();
}
}
else
{
if(u16Help >= VOLT_10V)
{
LED1_ON();
}
else
{
LED1_OFF();
}
if(u16Help >= VOLT_10V5)
{
LED2_ON();
}
else
{
LED2_OFF();
}
if(u16Help >= VOLT_11V)
{
LED3_ON();
}
else
{
LED3_OFF();
}
if(u16Help >= VOLT_11V5)
{
LED4_ON();
}
else
{
LED4_OFF();
}
if(u16Help >= VOLT_12V)
{
LED5_ON();
}
else
{
LED5_OFF();
}
}
}
Here is the call graph for this function:
![]()
Here is the caller graph for this function:
![]() |
1.7.2