Commit 984eb287 authored by 何锐's avatar 何锐

feat:修改蓝牙投屏时间

parent 26ad814b
......@@ -30,7 +30,7 @@ static const PartVersion g_versionTable[] = {
{NULL, NULL, NULL, NULL} // 结束标志
};
uint8_t checkresult = 0; //校验结果
uint8_t CheckResult = 0; //校验结果
uint8_t CurrentPN = 0xFF; //当前零件号
uint32_t Display_Menu_Type;
uint32_t Page_Refresh = 1;
......@@ -4824,7 +4824,6 @@ uint8_t TCSflaglast;
uint8_t SlopeDescentflaglast;
uint8_t RampParkflaglast;
uint8_t Autoheadlightflaglast;
uint8_t CheckResult = 0;
uint8_t up_key_press_number;
void Display_Version_Info(uint32_t ON_OFF)
{
......@@ -5109,7 +5108,7 @@ void Display_Version_Info(uint32_t ON_OFF)
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t mbuff [7] = {2,6,0,3,1,0,0xff};
uint8_t mbuff [7] = {2,6,0,3,2,7,0xff};
General_Number_Disp(mbuff, 160, 290);
}
......
......@@ -408,43 +408,62 @@ void BT_connect_service(void)
{
if(bt_control.BlueTooth == 1)
{
bt_control.bluetoothdelaytime++;
if(bt_control.bluetoothdelaytime <= 120) //延时12秒等待设置mac地址
{
;
bt_control.bluetoothdelaytime++;
}
else if(bt_control.bluetoothdelaytime <= 130) //下电1s
{
bt_control.bluetoothdelaytime++;
LINE_OUT_NEG_01 = 0;
LINE_OUT_NEG_04 = 0;
LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 0;
}
else if(bt_control.bluetoothdelaytime <= 350) //上电10s发送连接蓝牙指令以及查看连接情况
else //上电,发送串口开启WIFI连接
{
LINE_OUT_NEG_01 = 1;
LINE_OUT_NEG_04 = 1;
LINE_OUT_NEG_02 = 1;
LINE_OUT_NEG_03 = 1; //仪表上电
LINE_OUT_NEG_03 = 1;
bt_control.BlueToothSwitch = 1; //蓝牙开始指令
}
else if(bt_control.bluetoothdelaytime <= 360) //下电退出蓝牙投屏状态
{
LINE_OUT_NEG_01 = 0;
LINE_OUT_NEG_04 = 0;
LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 0;
}
else //上电
if(data_received_flag) //收到数据,连接成功
{
bt_control.BlueTooth = 0;
bt_control.bluetoothdelaytime = 0;
LINE_OUT_NEG_01 = 1;
LINE_OUT_NEG_04 = 1;
LINE_OUT_NEG_02 = 1;
LINE_OUT_NEG_03 = 1;
if(bt_control.bluetoothdelaytime <= 230) //显示22SWIFI投屏信息,用于检测界面
{
LINE_OUT_NEG_01 = 1;
LINE_OUT_NEG_04 = 1;
LINE_OUT_NEG_02 = 1;
LINE_OUT_NEG_03 = 1;
bt_control.bluetoothdelaytime++;
}
else if(bt_control.bluetoothdelaytime <= 240) //下电退出蓝牙投屏状态
{
LINE_OUT_NEG_01 = 0;
LINE_OUT_NEG_04 = 0;
LINE_OUT_NEG_02 = 0;
LINE_OUT_NEG_03 = 0;
bt_control.BlueToothSwitch = 0;
bt_control.bluetoothdelaytime++;
}
else //上电
{
bt_control.BlueTooth = 0;
bt_control.bluetoothdelaytime = 0;
LINE_OUT_NEG_01 = 1;
LINE_OUT_NEG_04 = 1;
LINE_OUT_NEG_02 = 1;
LINE_OUT_NEG_03 = 1;
}
}
}
else
{
bt_control.bluetoothdelaytime = 0;
bt_control.BlueToothSwitch = 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