Commit 33bc1913 authored by 李俭双's avatar 李俭双

feat:增加电压无效,显示--的标志

parent d06acc5e
......@@ -2,10 +2,12 @@
#include "Data_Voltage\Data_Voltage.h"
uint8_t voltage_value = 0;
uint8_t voltage_valid = 0;
void Data_Voltage_Init ( void )
{
voltage_value = 0;
voltage_valid = 0;
}
void Data_Voltage_Processing_Service ( void )
{
......@@ -14,15 +16,18 @@ void Data_Voltage_Processing_Service ( void )
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x401_Msg_Count) == CAN_SIG_LOST)
{
voltage_value = 0;
voltage_valid = 0;
}
else
{
voltage_value = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
voltage_valid = 1;
}
}
else
{
voltage_value = 0;
voltage_valid = 0;
}
}
......@@ -32,3 +37,7 @@ uint8_t Get_Battery_Voltage(void)
{
return voltage_value;
}
uint8_t Get_Battery_Voltage_Valid(void)
{
return voltage_valid;
}
\ No newline at end of file
......@@ -6,4 +6,5 @@
void Data_Voltage_Init ( void );
void Data_Voltage_Processing_Service ( void );
uint8_t Get_Battery_Voltage(void);
uint8_t Get_Battery_Voltage_Valid(void);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment