BlueTooth.c 1.39 KB
#include "Components.h"

uint8_t OTA_Update_Count = 0;
const uint8_t HJBlueToothName[9]= {"HJ_750TFT"};
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};
void BlueToothService()
{
    
    SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
    SetUUIDData((char *)UUIDConfigBuf, 22);
    // _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);
}

void UpdateGraphics(void)
{
     _PICID_Struct PicObj;
        PicObj.qr_logo_id = 0;
        PicObj.main_pic_id = Pic_0382; 
        PicObj.qr_pic_id = Pic_0316;
        PicObj.update_pic_id = Pic_0193;
        PicObj.second_menu = 0;
        PicObj.navigation_task_id = 0;
        PackedTransfer_DisplayPhoneMirrorQRcode(0, PicObj);
}
void OTAUpdateService(void)
{
    _QRCODE_RECT QRCode_Rect;
        QRCode_Rect.x = 457;
        QRCode_Rect.y = 137;
        QRCode_Rect.height = 240;
        QRCode_Rect.width = 240;
    if(OTA_Update_Flag == 1)
    {
        OTA_Update_Count++;
        if(OTA_Update_Count < 5)
        {
        SetUpdateCtrl(1,QRCode_Rect);
        }  
    }
    else
    {
        SetUpdateCtrl(0,QRCode_Rect);
        OTA_Update_Count=0;
    }
}