Commit ddb97726 authored by 张金硕's avatar 张金硕

Merge branch 'jinshuo' into 'dev'

Jinshuo

See merge request !79
parents ce9abc76 9b31a9e8
......@@ -7,6 +7,7 @@ uint8_t GetBlueToothVaild = 0;
uint8_t GetPhoneBookVaild = 0;
uint8_t TextInit = 0;
uint8_t SetUUIDTimes = 0;
uint16_t LastPhoneBookTotalCount = 0;
_PICID_Struct PicObj;
_QRCODE_RECT QRCode_Rect;
const uint8_t HJBlueToothName[9]= {"HJ750"};
......@@ -131,6 +132,9 @@ uint8_t PhoneNumber[40];
uint8_t LastPhoneNumber[20];
uint8_t LastBlueToothPhoneName[100];
uint8_t CurBlueToothPhoneName[100];
uint8_t BlueToothName[40];
uint8_t LastBlueToothName[20];
uint8_t PhoneNumberTotal[20];
void TextService(void)
{
......@@ -141,6 +145,9 @@ void TextService(void)
memset(LastPhoneNumber, 0, sizeof(LastPhoneNumber));
memset(LastBlueToothPhoneName, 0, sizeof(LastBlueToothPhoneName));
memset(CurBlueToothPhoneName, 0, sizeof(CurBlueToothPhoneName));
memset(BlueToothName, 0, sizeof(BlueToothName));
memset(LastBlueToothName, 0, sizeof(LastBlueToothName));
memset(PhoneNumberTotal, 0, sizeof(PhoneNumberTotal));
}
if (BlueToothPhoneData.BlueToothSignalSate == BlueTooth_Connection)
{
......@@ -167,5 +174,37 @@ void TextService(void)
}
}
}
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_CONNECT)
{
if (memcmp(LastBlueToothName, BlueToothPhoneData.BlueToothName, sizeof(LastBlueToothName)) != 0)
{
for (uint8_t i = 0; i < sizeof(BlueToothPhoneData.BlueToothName); i++)
{
BlueToothName[i * 2] = BlueToothPhoneData.BlueToothName[i];
BlueToothName[(i * 2) + 1] = 0X00;
}
memcpy(LastBlueToothName, BlueToothPhoneData.BlueToothName, sizeof(LastBlueToothName));
TextPara[TEXT_NUM_BLUETOOTH_NAME].Vaild = 0X01;
}
}
if (LastPhoneBookTotalCount != BlueToothPhoneData.PhoneBookTotalCount)
{
uint8_t TempNumberCnts = 0;
if (BlueToothPhoneData.PhoneBookTotalCount > 100)
{
PhoneNumberTotal[TempNumberCnts++] = (BlueToothPhoneData.PhoneBookTotalCount / 100) + 0x30;
PhoneNumberTotal[TempNumberCnts++] = 0x00;
}
if (BlueToothPhoneData.PhoneBookTotalCount > 10)
{
PhoneNumberTotal[TempNumberCnts++] = (BlueToothPhoneData.PhoneBookTotalCount / 10 % 10) + 0x30;
PhoneNumberTotal[TempNumberCnts++] = 0x00;
}
PhoneNumberTotal[TempNumberCnts++] = (BlueToothPhoneData.PhoneBookTotalCount % 100 % 10) + 0x30;
PhoneNumberTotal[TempNumberCnts++] = 0x00;
TextPara[TEXT_NUM_PHONE_NUMBER_TOTAL].Vaild = 0x01;
LastPhoneBookTotalCount = BlueToothPhoneData.PhoneBookTotalCount;
}
}
......@@ -39,6 +39,8 @@ extern _PICID_Struct PicObj;
extern _QRCODE_RECT QRCode_Rect;
extern uint8_t PhoneNumber[40];
extern uint8_t CurBlueToothPhoneName[100];
extern uint8_t BlueToothName[40];
extern uint8_t PhoneNumberTotal[20];
extern TEXT_STRUCT TextPara[];
#endif
\ No newline at end of file
......@@ -73,7 +73,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
case KEY_EVENT_LONG_PRESS_3: //5s
break;
case KEY_EVENT_LONG_PRESS_4: //10s
//TYW_RESET_ODO();
TYW_RESET_ODO();
Get_Into_OTA_Update_Mode();
break;
case KEY_EVENT_OFF_TO_ON:
......@@ -355,7 +355,7 @@ void TYW_RESET_ODO(void)
if((Get_DispVechileSpeed() >= 1500)&&(Get_DispEngineSpeed() >= 12000))
{
ClearODO_Flag = 1;
//Data_Mileage_Clear();
Data_Mileage_Clear();
}
}
}
......@@ -390,7 +390,7 @@ void My_Key_Service(void)
/* 自检时不可操作按键 */
if(g_u8SelfCheck)
{
if(Get_ActualVechileSpeed() == 0)
if((Get_ActualVechileSpeed() == 0) ||((Get_DispVechileSpeed() >= 1990) && (Get_DispEngineSpeed() >= 12000)))
{
Key_Service();
}
......
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