Commit a52b9273 authored by 李俭双's avatar 李俭双

Merge branch 'lijianshuang' into 'dev'

Lijianshuang

See merge request !27
parents ca47e7a3 9151cfb9
......@@ -3,23 +3,51 @@
#include "Components.h"
#include "Application.h"
#include "TrmerM\TrmerM.h"
#include "Line_In\Line_In_user.h"
#define BACK_LIGHT_DAY 600
#define BACK_LIGHT_NIGHT 420
_Light g_Light;
//_Light g_Light;
uint8_t LED_Turnoff = 0;
uint8_t LED_Turnon = 0;
void BackLight_Init(void)
{
g_Light.Light_Day = 0XFFFF;
g_Light.Light_Night = 0XFFFF;
//g_Light.Light_Day = 0XFFFF;
//g_Light.Light_Night = 0XFFFF;
LED_Turnoff = 0;
LED_Turnon = 0;
}
void BackLight_Process(void)
{
if (SYS_OPR_STAT_IGN_ON)
{
if ( HighBeam_Timer.LED_Turnon == 10 )
if (Line_In_Get_Status(LINE_IN_Little_Lamp))
{
if(LED_Turnon < 5)
{
LED_Turnon ++ ;
}
else
{
LED_Turnon = 5;
LED_Turnoff = 0;
}
}
else
{
if(LED_Turnoff < 5)
{
LED_Turnoff ++ ;
}
else
{
LED_Turnoff = 5;
LED_Turnon = 0;
}
}
if ( LED_Turnon == 5 )
{
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_NIGHT);
}
......@@ -31,8 +59,8 @@ void BackLight_Process(void)
}
else
{
g_Light.Light_Day = 0;
g_Light.Light_Night = 0;
//g_Light.Light_Day = 0;
//g_Light.Light_Night = 0;
TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 0);
}
}
#ifndef _BACKLIGHT_H_
#define _BACKLIGHT_H_
#include "common.h"
#include "Application.h"
typedef struct
{
uint8_t Duty;
......
......@@ -12,6 +12,9 @@ const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL] =
{0x6EEul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_6EE, (void *)0},
{0x6EFul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_6EF, (void *)0},
{0x450ul, 100ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_450, (void *)0},
#if (IC_Current == TY200_080000b_ty)
{0x580ul, 10ul * 1000ul, 7ul * 1000ul, 0u, MSG_STD, 1u, 8u, CAN_MSG_TX_CYCLE, Can_Set_Buff_580, (void *)0},
#endif
};
const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
......
......@@ -24,6 +24,9 @@ typedef enum
CAN_CH0_ID_CAN_0x6EE_Msg_Count,
CAN_CH0_ID_CAN_0x6EF_Msg_Count,
CAN_CH0_ID_CAN_0x450_Msg_Count,
#if (IC_Current == TY200_080000b_ty)
CAN_CH0_ID_CAN_0x580_Msg_Count,
#endif
CAN_CH0_ID_SEND_TOTAL,
} CAN_CH0_CAN_MSG_SEND_ID_t;
......
......@@ -100,5 +100,44 @@ void Can_Set_Buff_450(canlib_uint8_t CopyData[])
p450 -> Sig.Rear_Pressure_TX_H = (Get_Rear_TPMS_TX() >> 8) & 0xFF;
p450 -> Sig.Rear_Pressure_TX_L = Get_Rear_TPMS_TX() & 0xFF;
}
void Can_Set_Buff_580(canlib_uint8_t CopyData[])
{
CANMsg580Union *p580;
uint8_t i = 0;
p580 = (CANMsg580Union *)CopyData;
if ( p580 != ( void * )0 )
{
for ( i = 0u; i < 8u; i++ )
{
p580->Msg [ i ] = 0xFFu;
}
}
if(Get_Tpms_TX_Flag() == 1)
{
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x08;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x00;
}
else if(Get_Tpms_TX_Flag() == 1)
{
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x31;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x01;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x59;
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x08;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x01;
}
else
{
p580 -> Sig.TPMS_LEARN_CND_BYTE0 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE1 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE2 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE3 = 0x0;
p580 -> Sig.TPMS_LEARN_CND_BYTE4 = 0x02;
}
}
......@@ -89,6 +89,20 @@ typedef union
} Sig;
} CANMsg450Union;
typedef union
{
uint8_t Msg [ 8 ];
struct
{
uint8_t TPMS_LEARN_CND_BYTE0 : 8;
uint8_t TPMS_LEARN_CND_BYTE1 : 8;
uint8_t TPMS_LEARN_CND_BYTE2 : 8;
uint8_t TPMS_LEARN_CND_BYTE3 : 8;
uint8_t TPMS_LEARN_CND_BYTE4 : 8;
uint32_t Res1 : 24;
} Sig;
} CANMsg580Union;
......@@ -96,6 +110,7 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[]);
void Can_Set_Buff_6EE(canlib_uint8_t CopyData[]);
void Can_Set_Buff_6EF(canlib_uint8_t CopyData[]);
void Can_Set_Buff_450(canlib_uint8_t CopyData[]);
void Can_Set_Buff_580(canlib_uint8_t CopyData[]);
#endif
......@@ -173,6 +173,20 @@ void Can_Tx_Apply_Buff(void)
CAN_MessageCache_DeInit(CAN0MSG10);
CAN_MessageCache_Init(CAN0MSG10, &CAN_SendMsg);
CAN_SendMsg.Id = 0x580;
CAN_SendMsg.IDE = CAN_Id_Standard;
CAN_SendMsg.CacheType = CAN_CacheType_Tx;
CAN_SendMsg.RTR = CAN_RTR_Data;
CAN_RecvMsg.Interrupt = DISABLE;
CAN_SendMsg.DLC = 8;
for (uint8_t i = 0; i < CAN_SendMsg.DLC; i++)
{
CAN_SendMsg.Data[i] = 0;
}
CAN_MessageCache_DeInit(CAN0MSG14);
CAN_MessageCache_Init(CAN0MSG14, &CAN_SendMsg);
CAN_SendMsg_Diag_Tx.Id = DIAG_ID_Tx;
......@@ -321,7 +335,9 @@ void Can_Write(st_CAN_Msg *Msg)
case 0x220:
CAN_Transmit(CAN0MSG10, &CAN_SendMsg);
break;
case 0x580:
CAN_Transmit(CAN0MSG14, &CAN_SendMsg);
break;
default:
break;
}
......
#ifndef _COMMON_INTERFACE_H_
#define _COMMON_INTERFACE_H_
#include "Components.h"
#define TY200_080000b 0
#define TY200_080000b_ty 1
#define IC_Current TY200_080000b_ty //选择当前程序为哪个零件号的仪表
/*COMMON INTERFACE*/
typedef enum
......
......@@ -3,25 +3,52 @@
uint8_t voltage_value = 0;
uint8_t voltage_valid = 0;
DataVoltageStruct VoltageStruct;
void Data_Voltage_Init ( void )
{
voltage_value = 0;
voltage_valid = 0;
VoltageStruct.Cnt = 0;
}
void Data_Voltage_Processing_Service ( void )
{
uint8_t voltage = 0;
uint8_t i = 0;
if ( Common_Get_IG_Sts() == COMMON_POWER_ON )
{
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x401_Msg_Count) == CAN_SIG_LOST)
{
voltage_value = 0;
voltage_valid = 0;
VoltageStruct.Cnt = 0;
}
else
{
voltage_value = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
voltage_valid = 1;
if(voltage_valid == 0)
{
voltage_value = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
voltage_valid = 1;
}
else
{
voltage_valid = 1;
VoltageStruct.Buffer[VoltageStruct.Cnt] = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
i = VoltageStruct.Cnt;
while ((i > 0) && (VoltageStruct.Buffer[i] < VoltageStruct.Buffer[i - 1]))
{
voltage = VoltageStruct.Buffer[i];
VoltageStruct.Buffer[i] = VoltageStruct.Buffer[i - 1];
VoltageStruct.Buffer[i - 1] = voltage;
i --;
}
VoltageStruct.Cnt ++ ;
if (VoltageStruct.Cnt >= 30)
{
VoltageStruct.Cnt = 0;
voltage_value = (VoltageStruct.Buffer[14] + VoltageStruct.Buffer[15] + VoltageStruct.Buffer[16]) / 3;
}
}
}
}
else
......
......@@ -3,6 +3,15 @@
#include "common.h"
typedef struct
{
uint32_t Buffer[30];
uint8_t Cnt;
uint8_t time;
uint16_t ResOpen_ActTimer;
uint16_t ResOpen_InActTimer;
}DataVoltageStruct;
void Data_Voltage_Init ( void );
void Data_Voltage_Processing_Service ( void );
uint8_t Get_Battery_Voltage(void);
......
......@@ -12,4 +12,4 @@ void ECU_FaultCode_Processing_Service ( void );
extern void Fault_Code_Receive(uint8_t CopyData[]);
static void Fault_Code_App_SortNByte(uint32_t *SortData, uint8_t len);
static void Fault_Code_App_Swap(uint32_t *pData1, uint32_t *pData2);
#endif
\ No newline at end of file
#endif
......@@ -11,11 +11,17 @@ uint8_t PageType = 0;
uint8_t PageMenu = 0;
uint8_t Hour_Set = 0;
uint8_t Minute_Set = 0;
RTC_TimeTypeDef RTC_TimeStruct;
RTC_DateTypeDef RTC_DateStruct;
RTC_CounterTypeDef counter_val;
void Data_TCS_Set_OnOff(uint32_t u32Data)
{
uint32_t u32Data1[1u] = {0};
u32Data1[0u] = u32Data;
Data_User_EEPROM_Write(EM_MenuData_Tcs_Val, u32Data1, 1u);
}
void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode
{
switch (enKeyEvent)
......@@ -50,10 +56,12 @@ void Key_Operation_Left(Key_Event_en_t enKeyEvent)//Mode
if(Get_Dis_Tcs_Val() == 0)
{
MenuData.Tcs_Val = 1;//on
Data_TCS_Set_OnOff(MenuData.Tcs_Val);
}
else
{
MenuData.Tcs_Val = 0;//off
Data_TCS_Set_OnOff(MenuData.Tcs_Val);
}
}
......@@ -410,14 +418,18 @@ void Menu_u8Data_Updata_Process(uint8_t updateDir , uint8_t datMax, uint8_t datM
void MenuData_Unit_Init(void)
{
uint32_t TCS[1] = {0};
Data_User_EEPROM_Read(EM_MenuData_Tcs_Val, TCS, 1u);
MenuData.KM_Unit = 0;
MenuData.Tpms_Unit = 0;
MenuData.Tcs_Val = 1;
MenuData.Tpms_Unit = 0;
MenuData.Tcs_Val = TCS[0];
}
void MenuData_TCS_Init(void)
{
MenuData.Tcs_Val = 1;
uint32_t TCS[1] = {0};
Data_User_EEPROM_Read(EM_MenuData_Tcs_Val, TCS, 1u);
MenuData.Tcs_Val = TCS[0];
PageType = Page_Menu;
Hour_Set = 0;
Minute_Set = 0;
......@@ -448,7 +460,7 @@ void TYW_RESET_ODO(void)
void Maintain_Reset_Service(void)
{
if((Get_Data_Maintenace_Interval_Processing() == 0) && (PageMenu == Page_TCS) && (PageType == Page_Menu))
if((Get_Data_Maintenace_Interval_Processing() == 0) && (PageMenu != Page_Trip) && (PageMenu != Page_TCS) && (PageType == Page_Menu))
{
Data_Maintenance_Interval_Reset();
}
......
......@@ -19,7 +19,7 @@ typedef struct
uint8_t Dis_Minute;
uint8_t KM_Unit; // 0 km, 1 mile
uint8_t Tpms_Unit;// 0 bar, 1 psi
uint8_t Tcs_Val; // 0 off, 1 on
uint32_t Tcs_Val; // 0 off, 1 on
}_Menu_Data;
typedef enum
......@@ -46,6 +46,7 @@ typedef enum
extern uint8_t PageType;
extern uint8_t ClearODO_Flag;
extern _Menu_Data MenuData;
extern RTC_CounterTypeDef counter_val;
extern void Key_KL30_Init_EXample(void);
extern void Key_Wakeup_Init_EXample(void);
......@@ -71,4 +72,5 @@ void Key_Check_Service(void);
void MenuData_Unit_Init(void);
void Maintain_Reset_Service(void);
void MenuData_TCS_Init(void);
void Data_TCS_Set_OnOff(uint32_t u32Data);
#endif
......@@ -13,9 +13,22 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Fault_ABS, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 500U, 20U, Get_LINE_IN_Oil_Pressure, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Auto_Start_Stop, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Little_Lamp, },
};
Linelib_uint8_t Get_LINE_IN_Little_Lamp(void)
{
Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(PositionBeam_P_IN))
{
ret = 1u;
}
else
{
ret = 0UL;
}
return ret;
}
Linelib_uint8_t Get_LINE_IN_TurnLeft(void)
{
Linelib_uint8_t ret = 0U;
......
......@@ -12,7 +12,7 @@ typedef enum
LINE_IN_Fault_ABS,
LINE_IN_Oil_Pressure,
LINE_IN_Auto_Start_Stop,
LINE_IN_Little_Lamp,
LINE_IN_MAX,
} LINE_IN_Enum_t;
......@@ -25,5 +25,6 @@ Linelib_uint8_t Get_LINE_IN_FAULT_ELECTROSPRAY(void);
Linelib_uint8_t Get_LINE_IN_Fault_ABS(void);
Linelib_uint8_t Get_LINE_IN_Oil_Pressure(void);
Linelib_uint8_t Get_LINE_IN_Auto_Start_Stop(void);
Linelib_uint8_t Get_LINE_IN_Little_Lamp(void);
#endif
......@@ -53,7 +53,8 @@ typedef enum
EM_TRIP_BLOCK, /**< 小计里程 */
EM_Maintenance_BLOCK, /**< 保养里程 */
EM_Maintenance_Firstflg, /**< 保养标志 */
EM_ENGODO_BLOCK, /**< 发动机总里程 */
EM_MenuData_Tcs_Val, /**< TCS开关标志 */
EM_MenuData_TPMS_LEARN, /**< TPMS学习结果 */
} Data_EEPROM_Enum_t;
typedef void (*EEPromWrite)(Data_EEPROM_Enum_t BlockID, Millib_uint32_t u32Data[], Millib_uint16_t u16Len);
......
......@@ -18,7 +18,8 @@ extern uint32_t NVM_User_Settings_Service;
#define EEPROM_BLOCK_05 80
#define EEPROM_BLOCK_06 96
#define EEPROM_BLOCK_07 112
#define EEPROM_BLOCK_08 128
#define EEPROM_BLOCK_09 144
uint32_t Milleage_InitFlag = 0U;
......@@ -38,6 +39,7 @@ void Data_User_Mileage_KL30Init(void)
ODO_Init_t ODOInit = {0};
uint32_t Maintenance_Firstflg[1u] = {0};
Trip_Init_t TripInit[4] = {0};
uint32_t TPMSLearn[2] = {0,0};
Milleage_InitFlag = 0U;
// �������ݴ�EEPROM�ж�ȡ
(void)Data_User_EEPROM_Read(EM_MILEAGE_BLOCK, TempBuf, 1);
......@@ -110,6 +112,21 @@ void Data_User_Mileage_KL30Init(void)
Data_User_EEPROM_Write(EM_Maintenance_BLOCK, &NVM_User_Settings_Service, 1u);
}
Data_User_EEPROM_Read(EM_MenuData_Tcs_Val, TempBuf, 1u);
if (TempBuf[0u] == 0xFFFFFFFF)
{
MenuData.Tcs_Val = 1;
Data_User_EEPROM_Write(EM_MenuData_Tcs_Val, &MenuData.Tcs_Val, 1u);
}
Data_User_EEPROM_Read(EM_MenuData_TPMS_LEARN, TempBuf, 2u);
if (TempBuf[0u] == 0xFFFFFFFF)
{
TPMSLearn[0] = MenuData.TPMS_Front_Learn;
TPMSLearn[1] = MenuData.TPMS_Rear_Learn;
Data_User_EEPROM_Write(EM_MenuData_TPMS_LEARN, TPMSLearn, 2u);
}
Milleage_InitFlag = 0X5AA53AA3UL;
}
......@@ -134,7 +151,6 @@ void Data_User_Mileage_WakeupInit(void)
uint32_t Get_MileageInit_Status(void)
{
return Milleage_InitFlag;
}
......@@ -163,6 +179,12 @@ uint32_t Get_MileageInit_Status(void)
case EM_Maintenance_Firstflg:
eeprom_ReadRecord(EEPROM_BLOCK_07, (uint8_t *)u32Data, u16Len * 4);
break;
case EM_MenuData_Tcs_Val:
eeprom_ReadRecord(EEPROM_BLOCK_08, (uint8_t *)u32Data, u16Len * 4);
break;
case EM_MenuData_TPMS_LEARN:
eeprom_ReadRecord(EEPROM_BLOCK_09, (uint8_t *)u32Data, u16Len * 4);
break;
default:
break;
......@@ -205,7 +227,12 @@ uint32_t Get_MileageInit_Status(void)
case EM_Maintenance_Firstflg:
eeprom_WriteRecord(EEPROM_BLOCK_07, (uint8_t *)u32Data, u16Len * 4);
break;
case EM_MenuData_Tcs_Val:
eeprom_WriteRecord(EEPROM_BLOCK_08, (uint8_t *)u32Data, u16Len * 4);
break;
case EM_MenuData_TPMS_LEARN:
eeprom_WriteRecord(EEPROM_BLOCK_09, (uint8_t *)u32Data, u16Len * 4);
break;
default:
break;
}
......
......@@ -130,6 +130,7 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init(TIMERM_COUNTER1, TIMERM_CHB, ActiveLevel_High);
Telltales_Init();
Telltales_UserInit();
Data_TPMS_KL15_WAKE_UP_Init();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(WAKEUP_KL15_In,Trigger_Rising);
}
......@@ -159,7 +160,8 @@ static void Power_IG_ON_Init(void)
Data_Voltage_Init();
MenuData_TCS_Init();
Data_Coolant_Temp_KL15_Init();
BlueTooth_KL30_KL15_Wakeup_Init();
BlueTooth_KL30_KL15_Wakeup_Init();
Data_TPMS_KL15_WAKE_UP_Init();
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
}
......
......@@ -43,6 +43,7 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t LED_Battery_Voltage = 0;
Tellib_uint16_t Battery_Voltage_valid = 0;
const LED_Attribute_st LED_Attribute [ LED_Max ] = {
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
......@@ -82,6 +83,7 @@ void Telltales_UserInit(void)
HighBeam_Timer.LED_Turnon = 0;
HighBeam_Timer.LED_Turnoff = 0;
LED_Battery_Voltage = 0;
Battery_Voltage_valid = 0;
}
static Tellib_uint16_t LED_High_Beam_Judgement(void)
......@@ -90,29 +92,29 @@ static Tellib_uint16_t LED_High_Beam_Judgement(void)
if (Line_In_Get_Status(LINE_IN_HighBeam))
{
LED_STATE = 1;
if(HighBeam_Timer.LED_Turnon < 10 )
{
HighBeam_Timer.LED_Turnon ++;
}
else
{
HighBeam_Timer.LED_Turnon = 10;
HighBeam_Timer.LED_Turnoff = 0;
}
//if(HighBeam_Timer.LED_Turnon < 10 )
//{
// HighBeam_Timer.LED_Turnon ++;
//}
//else
//{
// HighBeam_Timer.LED_Turnon = 10;
// HighBeam_Timer.LED_Turnoff = 0;
//}
}
else
{
LED_STATE = 0;
if(HighBeam_Timer.LED_Turnoff < 10 )
{
HighBeam_Timer.LED_Turnoff ++;
}
else
{
HighBeam_Timer.LED_Turnoff = 10;
HighBeam_Timer.LED_Turnon = 0;
}
//if(HighBeam_Timer.LED_Turnoff < 10 )
//{
// HighBeam_Timer.LED_Turnoff ++;
//}
//else
//{
// HighBeam_Timer.LED_Turnoff = 10;
// HighBeam_Timer.LED_Turnon = 0;
//}
}
return LED_STATE;
......@@ -509,25 +511,44 @@ static Tellib_uint16_t LED_Low_Batt_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t Battery_Voltage = 0u;
Battery_Voltage = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
if((CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x401_Msg_Count) == CAN_SIG_LOST) )
{
LED_Battery_Voltage = 1;
Battery_Voltage_valid = 0;
}
else
{
if (Battery_Voltage < 118)
if(Battery_Voltage_valid == 1)
{
LED_Battery_Voltage = 1;
}
else if (Battery_Voltage >= 120)
{
LED_Battery_Voltage = 0;
Battery_Voltage_valid = 1;
if (Get_Battery_Voltage() < 118)
{
LED_Battery_Voltage = 1;
}
else if (Get_Battery_Voltage() >= 120)
{
LED_Battery_Voltage = 0;
}
else
{
;
}
}
else
{
;
Battery_Voltage_valid = 1;
if (Get_Battery_Voltage() < 118)
{
LED_Battery_Voltage = 1;
}
else
{
LED_Battery_Voltage = 0;
}
}
}
LED_STATE = LED_Battery_Voltage;
return LED_STATE;
......
This diff is collapsed.
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