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

feat:新增打电话时为同步联系人显示人名,否则显示电话号

parent 6df8bb26
......@@ -363,4 +363,15 @@ void TextService(void)
}
}
uint8_t Get_Talking_PhoneBookValid(void)
{
for(uint8_t i=0;i<100;i++)
{
if(CurBlueToothPhoneName[i]!=0)
return 1;
}
return 0;
}
......@@ -39,6 +39,7 @@ static const uint8_t SW_Version[3] = {SW_EXTERNAL_VERSION};
extern void BlueToothService(void);
extern uint8_t Get_Talking_PhoneBookValid(void);
extern _PICID_Struct PicObj;
extern _QRCODE_RECT QRCode_Rect;
extern uint8_t PhoneNumber[40];
......
......@@ -3147,87 +3147,122 @@ static void AMT630H_GUI_Telephone()
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0939_62_401);
if(g_u8Display_Mode == ModeDAY)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 54, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(g_u8Display_Mode == ModeNIGHT)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 54, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0938_62_399);
if(g_u8Display_Mode == ModeDAY)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 54, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(g_u8Display_Mode == ModeNIGHT)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 54, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0548_62_401);
if(g_u8Display_Mode == ModeDAY)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 54, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(g_u8Display_Mode == ModeNIGHT)
{
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 53, 463, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
......@@ -3235,6 +3270,7 @@ static void AMT630H_GUI_Telephone()
}
}
}
}
else
{
;
......@@ -3260,45 +3296,65 @@ static void AMT630H_GUI_PhoneConnect_Telephone()
{ if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0451_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0943_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0450_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
}
else
{
......@@ -3311,43 +3367,61 @@ static void AMT630H_GUI_PhoneConnect_Telephone()
{ if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Outgoing)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0451_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Talking)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0943_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
else if(BlueToothPhoneData.BlueToothPhoneSate == Phone_Incoming)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0450_751_555);
if(Get_Talking_PhoneBookValid() == 1)
{
if(TextPara[TEXT_NUM_BLUETOOTH_PHONENAME].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)CurBlueToothPhoneName, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
else
{
if(TextPara[TEXT_NUM_PHONE_NUMBER].Vaild == 0X01)
{
PackedTransfer_LabelsList( 0x4022,(uint8_t *)PhoneNumber, 40);
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0,0,0,0XFF),TEXT_LINE_OFFSET(1,1));
SetPageText(GRAPHICS_PAGE_0, 0x4022, 786, 561, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
}
}
}
}
......
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