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

feat:新增按键接听挂断电话功能,来电去电通话中时回到主页

parent feb92109
......@@ -16,40 +16,41 @@ uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf
// ee_uint16_t juasfha;
void BlueToothService()
{
char i;
if(Get_Dis_Bluetooth_Open_Close() == 0)
if(Get_Dis_Bluetooth_Open_Close() == 0)
{
if(GetBlueToothVaild == 0)
{
if(GetBlueToothVaild == 0)
{
SetBluetoothTurnXX(1);
GetBlueToothVaild = 1;
}
SetBluetoothTurnXX(1);
GetBlueToothVaild = 1;
}
else
}
else
{
if(GetBlueToothVaild == 1)
{
if(GetBlueToothVaild == 1)
{
SetBluetoothTurnXX(0);
GetBlueToothVaild = 0;
}
SetBluetoothTurnXX(0);
GetBlueToothVaild = 0;
}
}
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;
}
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
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);
}
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
// SetUUIDData((char *)UUIDConfigBuf, 22);
// SetUUIDData((char *)UUIDConfigBuf, 22);
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
// juasfha = BlueToothPhoneData.PhoneBookTotalCount;
......
......@@ -235,6 +235,10 @@ void Key_Event_Short_Press_Left(void)//选择
Menu_Service(MENU_KEY_DOWN_SHORT);
}
}
if ((BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking))
{
PackedTransfer_BlueTooth_DataSet(Phone_Pick_Up);
}
}
void Key_Event_Short_Press_Right(void)//确认
......@@ -279,6 +283,10 @@ void Key_Event_Short_Press_Right(void)//确认
{
Menu_Service(MENU_KEY_CONFIRM_SHORT);
}
if ((BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming) || (BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking))
{
PackedTransfer_BlueTooth_DataSet(Phone_Hangup_Out);
}
}
uint8_t OTA_Update_Flag = 0;
......
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