Commit 72f99ad8 authored by 张金硕's avatar 张金硕

🐞 fix:修改蓝牙关闭和igoff时可以连接的问题

parent 53304d13
......@@ -13,6 +13,7 @@ _QRCODE_RECT QRCode_Rect;
const uint8_t HJBlueToothName[9]= {"HJ750"};
uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00};
//"600032023120100000995"
uint8_t SetBluetoothCloseCount = 0;
uint8_t OSVersionASCLLList[20] =
{
0x56,0x00,
......@@ -47,98 +48,95 @@ void TextService(void);
void BlueToothService(void)
{
// SetUUIDTimes++;
if(Get_Dis_Bluetooth_Open_Close() == 0)
if(SYS_OPR_STAT_IGN_ON)
{
if(GetBlueToothVaild == 0)
if(Get_Dis_Bluetooth_Open_Close() == 0)
{
SetBluetoothTurnXX(1);
GetBlueToothVaild = 1;
if(GetBlueToothVaild == 0)
{
SetBluetoothTurnXX(1);
GetBlueToothVaild = 1;
}
}
}
else
{
if(GetBlueToothVaild == 1)
else
{
SetBluetoothTurnXX(0);
GetBlueToothVaild = 0;
if(GetBlueToothVaild == 1)
{
if(SetBluetoothCloseCount < 30)
{
SetBluetoothTurnXX(0);
}
else
{
GetBlueToothVaild = 0;
SetBluetoothCloseCount = 0;
}
SetBluetoothCloseCount++;
}
}
}
if ((BlueToothPhoneData.BlueToothSignalSate == BlueTooth_Connection)&&(GetPhoneBookVaild == 0))
{
PackedTransfer_GetPhoneBookCmd();
GetPhoneBookVaild = 1;
}
else if (BlueToothPhoneData.BlueToothSignalSate == BlueTooth_DisConnect)
{
GetPhoneBookVaild = 0;
}
if ((BlueToothPhoneData.BlueToothSignalSate == BlueTooth_Connection)&&(GetPhoneBookVaild == 0))
{
PackedTransfer_GetPhoneBookCmd();
GetPhoneBookVaild = 1;
}
else if (BlueToothPhoneData.BlueToothSignalSate == BlueTooth_DisConnect)
{
GetPhoneBookVaild = 0;
}
if((BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking))
{
Menu_Change_Branch_To_Item(MENU_BRANCH_ANIMATION,MENU_ITEM_MAIN_ITEM);
}
SetUUIDData((char *)UUIDConfigBuf, 22);
if (OTA_Update_Flag == 1)
{
QRCode_Rect.x = 650;
QRCode_Rect.y = 210;
}
else
{
QRCode_Rect.x = QRCode_X;
QRCode_Rect.y = QRCode_Y;
}
// QRCode_Rect.x = 650;
// QRCode_Rect.y = 210;
QRCode_Rect.height = 240;
QRCode_Rect.width = 240;
SetScreenType(QRCode_TYPE, QRCode_Rect);
if(Menu_Get_Current_Cursor_Information() != MENU_ITEM_FAULT_INFORMATION)
{
OTA_Update_Flag = 0;
}
if(OTA_Update_Flag == 1)
{
if(OTA_Update_Count_Open < 5)
if((BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking))
{
SetUpdateCtrl(1,QRCode_Rect);
OTA_Update_Count_Open++;
}
OTA_Update_Count_Close = 0;
}
Menu_Change_Branch_To_Item(MENU_BRANCH_ANIMATION,MENU_ITEM_MAIN_ITEM);
}
SetUUIDData((char *)UUIDConfigBuf, 22);
if (OTA_Update_Flag == 1)
{
QRCode_Rect.x = 650;
QRCode_Rect.y = 210;
}
else
{
QRCode_Rect.x = QRCode_X;
QRCode_Rect.y = QRCode_Y;
}
// QRCode_Rect.x = 650;
// QRCode_Rect.y = 210;
QRCode_Rect.height = 240;
QRCode_Rect.width = 240;
SetScreenType(QRCode_TYPE, QRCode_Rect);
if(Menu_Get_Current_Cursor_Information() != MENU_ITEM_FAULT_INFORMATION)
{
OTA_Update_Flag = 0;
}
if(OTA_Update_Flag == 1)
{
if(OTA_Update_Count_Open < 5)
{
SetUpdateCtrl(1,QRCode_Rect);
OTA_Update_Count_Open++;
}
OTA_Update_Count_Close = 0;
}
else
{
if(OTA_Update_Count_Close < 5)
{
SetUpdateCtrl(0,QRCode_Rect);
OTA_Update_Count_Close++;
}
OTA_Update_Count_Open=0;
}
SetTaskbarHeight(150);
SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
TextService();
}
else
{
if(OTA_Update_Count_Close < 5)
{
SetUpdateCtrl(0,QRCode_Rect);
OTA_Update_Count_Close++;
}
OTA_Update_Count_Open=0;
SetBluetoothTurnXX(0);
GetBlueToothVaild =0;
}
SetTaskbarHeight(150);
SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
TextService();
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
// juasfha = BlueToothPhoneData.PhoneBookTotalCount;
// for(i=0;i<20;i++)
// {
// sjhja[i] = BlueToothPhoneData.PhoneNumber[i];
// }
// for(i=0;i<100;i++)
// {
// PhoneName[i] = BlueToothPhoneData.BlueToothPhoneName[i];
// }
// _QRCODE_RECT QRCode_Rect;
// QRCode_Rect.x = QRCode_X;
// QRCode_Rect.y = QRCode_Y;
// QRCode_Rect.height = QRCode_HEIGHT;
// QRCode_Rect.width = QRCode_WIDTH;
// SetScreenType(QRCode_TYPE, QRCode_Rect);
}
TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
......
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