Commit 6c42cf9a authored by 梁百峰's avatar 梁百峰

feat:增加光感限制,修改版本号,清大计关闭自动大灯

parent c96bb4ae
......@@ -51,6 +51,7 @@ uint8_t blename[5];
uint8_t btmac[6];
uint8_t firstpowerflag = 0;
uint16_t lightnumber = 0;
uint8_t writeflag = 0;
void get_key(void)
{
key_array[0] = seed_value[0] | seed_value[3];
......@@ -135,6 +136,7 @@ void datacheck(void)
blename[3] = RS485_data[9];
blename[4] = 0xff;
lightnumber = (RS485_data[11]<<8)+RS485_data[10];
writeflag = RS485_data[12];
recvflag111 = 1;
RS485_TX_finish = 0;
// General_Number_Disp(blename, 3, 165);
......
......@@ -38,4 +38,5 @@ extern uint8_t recvflag111;
extern uint8_t firstpowerflag;
extern uint16_t lightnumber;
extern uint8_t btmac[6];
extern uint8_t writeflag;
#endif
\ No newline at end of file
......@@ -76,6 +76,10 @@ void MENU_CHECK_STEP_ADD(void)
{
MENU_CHECK_STEP = 0;
}
if((guangganflag == 2 || guangganflag == 1 ) && guangganflag != 3)
{
MENU_CHECK_STEP = 3;
}
}
void MENU_CHECK_STEP_SUB(void)
{
......@@ -239,6 +243,14 @@ uint8_t yibiaoshuju[34];
memcpy(erweima,barcode_Msg,34);
erweima[34] = 0xFF;
General_Number_Disp(erweima, 3, 90);
if(writeflag == 1 || writeflag == 3)
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_dui12 );
}
else
{
TFT_LCD_Draw_Bmp(200, 90+40, ( uint8_t * )gImage_cuo12 );
}
break;
case 1:
......
......@@ -3707,12 +3707,12 @@ void Display_Version_Info(uint32_t ON_OFF)
if(R485_ID4Dh.Sig.MaterialCode07 == 0x47)
{
nowbanbenhao = 1;
nowbanbenhaohoumian = 11;
nowbanbenhaohoumian = 12;
}
else if(R485_ID4Dh.Sig.MaterialCode07 == 0x43)
{
nowbanbenhao = 2;
nowbanbenhaohoumian = 26;
nowbanbenhaohoumian = 27;
}
else
{
......@@ -3799,7 +3799,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,5,0,5,2,9,0xff};
uint8_t mbuff [7] = {2,5,0,6,0,4,0xff};
General_Number_Disp(mbuff, 160, 290);
}
......@@ -4231,7 +4231,7 @@ void Display_Send_ODO(uint8_t fuel)
}
uint8_t guangganflag = 0;
void Display_Send_Vspead(uint8_t menu)
{
uint8_t fuel_val = 0;
......@@ -4379,10 +4379,23 @@ void Display_Send_Vspead(uint8_t menu)
{
// TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_gImage_AutoX6_Y165);
TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_dui11 );
if(guangganflag == 2 || guangganflag == 3)
{
guangganflag = 3;
}
else
{
guangganflag = 1;
}
}
else
{
TFT_LCD_Draw_Bmp(70, 40+25+25+25+25+25+25+25+25, ( uint8_t * )gImage_cuo11 );
if(guangganflag == 1)
{
guangganflag = 2;
}
}
break;
......
......@@ -96,6 +96,7 @@ extern const uint8_t * Letter_Num_11[];
extern uint32_t loc_Current_0;
extern void Get_static_Current(void);
extern uint32_t Get_Display_Type(void);
extern uint8_t guangganflag;
extern const uint8_t *Num_15[];
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#endif
......@@ -205,7 +205,7 @@ uint32_t R485_Send_0x41(void)
case 3:
if(clearOdoFlag == 1)
{
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x1; // 自动大灯
R485_ID41h.Sig.EleHeadlightFunctionSettings = 0x0; // 自动大灯
R485_ID41h.Sig.ChargeState = 0x0; //充电状态
R485_ID41h.Sig.SlopePattern = 0x0; //跛行
R485_ID41h.Sig.CushionSensorStatus = 0x1; //坐垫压力
......
......@@ -121,7 +121,17 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
}
else if(zhenduanflag == 1)
{
R485_Send_0x47();
if(writeflag == 1 || writeflag ==3)
{
R485_Send_0x47();
}
else
{
R485_Send_0x80();
}
comparestart = 0;
}
else if(zhenduanflag == 2)
......
......@@ -118,11 +118,11 @@ void Sys_Startup_Init(void)
LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 1;
// Display_TFT_Clear();
// GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
Display_TFT_Clear();
GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
/*上电扫码校验功能如果需要扫码校验注释掉firstpowerflag = 2,打开上面两行的注释即可*/
firstpowerflag = 2;
// firstpowerflag = 2;
}
/***********************************************************************
......
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