Commit 966bf86e authored by 张金硕's avatar 张金硕

Merge branch 'jinshuo' into 'dev'

Jinshuo

See merge request !89
parents ebcb1966 f4fc76dc
......@@ -132,7 +132,7 @@ const uint8_t user_opt_data[4] __attribute__((used)) __attribute__((section(".AR
// <0x72=> VLVDH = 4.06V/3.98V, VLVDL = 2.75V ( interrupt & reset mode )
// <i> Please setting the item for interrupt & reset mode
// </h>
0x3B,
0x72,
/**
* @brief HOCO Control BYTE (FRQSEL)
......
......@@ -160,7 +160,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
{TEXT_NUM_INFORMATION_HW, 0x4014, 0}, //23F 23E
{TEXT_NUM_INFORMATION_OS, 0x4015, 0},
{TEXT_NUM_INFORMATION_MCU, 0x4016, 0},
{TEXT_NUM_ROAD_NAME, 0x4022, 0},
{TEXT_NUM_FAUULT_CODE, 0x4022, 0},
};
......@@ -173,6 +173,7 @@ uint8_t LastBlueToothName[20];
uint8_t PhoneNumberTotal[20];
uint8_t InformationOSVersion[20];
uint8_t InformationMCUVersion[26];
uint8_t TextFaultCodeNum[10];
void TextService(void)
{
......@@ -215,6 +216,7 @@ void TextService(void)
memset(BlueToothName, 0, sizeof(BlueToothName));
memset(LastBlueToothName, 0, sizeof(LastBlueToothName));
memset(PhoneNumberTotal, 0, sizeof(PhoneNumberTotal));
memset(TextFaultCodeNum, 0, sizeof(TextFaultCodeNum));
for (uint8_t i = 0; i < sizeof(OSVersionASCLLList); i++)
{
......@@ -284,6 +286,63 @@ void TextService(void)
TextPara[TEXT_NUM_PHONE_NUMBER_TOTAL].Vaild = 0x01;
LastPhoneBookTotalCount = BlueToothPhoneData.PhoneBookTotalCount;
}
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_402_Msg_Count) == CAN_SIG_LOST)
{
;
}
else
{
uint8_t FaultCodeNumCnts = 0;
uint8_t FaultCodeHighNum = 0;
uint8_t FaultCodeMidNum = 0;
FaultCodeHighNum = Get_Current_Hight_FaultCode();
FaultCodeMidNum = Get_Current_Mid_FaultCode();
TextFaultCodeNum[FaultCodeNumCnts++] = 0x50;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
if((((FaultCodeHighNum)&(0xF0)) >> 4)<10)
{
TextFaultCodeNum[FaultCodeNumCnts++] = (((FaultCodeHighNum)&(0xF0)) >> 4) + 0x30;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
else
{
TextFaultCodeNum[FaultCodeNumCnts++] = ((((FaultCodeHighNum)&(0xF0)) >> 4) % 10) + 0x41;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
if((((FaultCodeHighNum)&(0x0F)))<10)
{
TextFaultCodeNum[FaultCodeNumCnts++] = ((FaultCodeHighNum)&(0x0F)) + 0x30;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
else
{
TextFaultCodeNum[FaultCodeNumCnts++] = (((FaultCodeHighNum)&(0x0F)) % 10) + 0x41;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
if((((FaultCodeMidNum)&(0xF0)) >> 4)<10)
{
TextFaultCodeNum[FaultCodeNumCnts++] = (((FaultCodeMidNum)&(0xF0)) >> 4) + 0x30;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
else
{
TextFaultCodeNum[FaultCodeNumCnts++] = ((((FaultCodeMidNum)&(0xF0)) >> 4) % 10) + 0x41;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
if((((FaultCodeMidNum)&(0x0F)))<10)
{
TextFaultCodeNum[FaultCodeNumCnts++] = ((FaultCodeMidNum)&(0x0F)) + 0x30;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
else
{
TextFaultCodeNum[FaultCodeNumCnts++] = (((FaultCodeMidNum)&(0x0F)) % 10) + 0x41;
TextFaultCodeNum[FaultCodeNumCnts++] = 0x00;
}
TextPara[TEXT_NUM_FAUULT_CODE].Vaild = 0x01;
}
}
......@@ -13,7 +13,7 @@ typedef enum {
TEXT_NUM_INFORMATION_HW,
TEXT_NUM_INFORMATION_OS,
TEXT_NUM_INFORMATION_MCU,
TEXT_NUM_ROAD_NAME,
TEXT_NUM_FAUULT_CODE,
TEXT_NUM_TOTAL,
} TEXT_NUM_ENUM;
......@@ -47,6 +47,7 @@ extern uint8_t BlueToothName[40];
extern uint8_t PhoneNumberTotal[20];
extern uint8_t InformationOSVersion[20];
extern uint8_t InformationMCUVersion[26];
extern uint8_t TextFaultCodeNum[10];
extern TEXT_STRUCT TextPara[];
#endif
\ No newline at end of file
......@@ -140,6 +140,7 @@ static void Power_IG_ON_Init(void)
static void Power_Sleep_Init(void)
{
TimerM_PWM_counter_Output_Init(TIMERM_COUNTER1, 20000, 0);
Can_Tx_Apply_Buff();
rte_can_deinit(CAN_CH_0);
TMM0_Stop();
TMM1_Stop();
......
......@@ -35,8 +35,8 @@ static const monitorlib_uint16_t SysFun_Range [ 26u ] = {
u16ENTER_HIGH_N_RANGE,
u16Top_Vol,
500,
50u,
500, /*进入异常电压时间1s*/
50u, /*KL15消抖时间 100ms*/
u16Base_Vol,
u16ENTER_LOW_N_RANGE,
......
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