Commit 96c4c0e8 authored by 何锐's avatar 何锐

feat:随时扫码写入校验版本

parent 4d749bfa
...@@ -362,6 +362,7 @@ void datacheck(void) ...@@ -362,6 +362,7 @@ void datacheck(void)
} }
} }
uint8_t cmpresult = 3; uint8_t cmpresult = 3;
uint8_t copyover;
void BarCodeDataGet(void) void BarCodeDataGet(void)
{ {
...@@ -369,6 +370,7 @@ void BarCodeDataGet(void) ...@@ -369,6 +370,7 @@ void BarCodeDataGet(void)
{ {
memcpy(barcode_Msg,&mDataBufPtr1[6],34); memcpy(barcode_Msg,&mDataBufPtr1[6],34);
memcpy(barcode_Msg1,&mDataBufPtr1[6],34); memcpy(barcode_Msg1,&mDataBufPtr1[6],34);
copyover = 1;
} }
else else
{ {
......
...@@ -41,4 +41,5 @@ extern uint8_t btmac[6]; ...@@ -41,4 +41,5 @@ extern uint8_t btmac[6];
extern uint8_t writeflag; extern uint8_t writeflag;
extern uint8_t saomafinish; extern uint8_t saomafinish;
extern uint8_t mimaread[35]; extern uint8_t mimaread[35];
extern uint8_t copyover;
#endif #endif
\ No newline at end of file
...@@ -245,20 +245,22 @@ uint8_t yibiaoshuju[34]; ...@@ -245,20 +245,22 @@ uint8_t yibiaoshuju[34];
case 0: case 0:
if(saomafinish == 0) if(saomafinish == 0)
{ {
for(int i = 0;i<34;i++) if(copyover)
{ {
if(barcode_Msg[i] != erweima[i]) for(int i = 0;i<34;i++)
{ {
Display_TFT_Clear(); if(barcode_Msg[i] != erweima[i])
break; {
Display_TFT_Clear();
break;
}
} }
}
memcpy(erweima,barcode_Msg,34); memcpy(erweima,barcode_Msg,34);
erweima[34] = 0xFF; erweima[34] = 0xFF;
General_Number_Disp(erweima, 3, 60);
General_Number_Disp(erweima, 3, 60); }
if(writeflag == 1 || writeflag == 3) if(writeflag == 1 || writeflag == 3)
{ {
......
...@@ -17,11 +17,6 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) //下一步 ...@@ -17,11 +17,6 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) //下一步
{ {
zhenduansendStep = 0; zhenduansendStep = 0;
zhenduanflag = 0; zhenduanflag = 0;
MENU_CHECK_STEP = 0;
saomafinish = 4;
}
else if(saomafinish == 4)
{
MENU_CHECK_STEP_ADD(); MENU_CHECK_STEP_ADD();
} }
} }
...@@ -83,14 +78,10 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent) ...@@ -83,14 +78,10 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
// upkeyflag = 1; //按键加 // upkeyflag = 1; //按键加
if(firstpowerflag == 2) if(firstpowerflag == 2)
{ {
// if(zhenduanflag == 1) if(saomafinish == 1)
// {
if(saomafinish == 0)
{ {
zhenduansendStep = 5; zhenduansendStep = 5;
zhenduanflag = 1;
} }
// }
} }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
...@@ -107,7 +98,17 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent) ...@@ -107,7 +98,17 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
// zhenduanflag = 1; if(saomafinish == 3)
{
Display_TFT_Clear();
GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
firstpowerflag = 0;
saomafinish = 0;
}
else if(saomafinish == 0)
{
zhenduanflag = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
......
...@@ -118,11 +118,12 @@ void Sys_Startup_Init(void) ...@@ -118,11 +118,12 @@ void Sys_Startup_Init(void)
LINE_OUT_NEG_03 = 1; LINE_OUT_NEG_03 = 1;
LINE_OUT_NEG_04 = 1; LINE_OUT_NEG_04 = 1;
Display_TFT_Clear(); // Display_TFT_Clear();
GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size); // GUI_Display_Version_Code_Service(25, 20, "Please Scan The Code ", Letter_Num_11, PCodeText_Space_size);
/*上电扫码校验功能如果需要扫码校验注释掉firstpowerflag = 2,打开上面两行的注释即可*/ /*上电扫码校验功能如果需要扫码校验注释掉firstpowerflag = 2,打开上面两行的注释即可*/
// firstpowerflag = 2; firstpowerflag = 2;
saomafinish = 3;
} }
/*********************************************************************** /***********************************************************************
......
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