Commit f1ef53db authored by 何锐's avatar 何锐

feat:上一步未检验通过,限制下一步

parent 03795fc7
......@@ -72,7 +72,16 @@ void Function_Check_Ctrl(uint32_t cmd);
void MENU_CHECK_STEP_ADD(void)
{
MENU_CHECK_STEP++;
if(step_check == 2)
{
step_check = 0;
MENU_CHECK_STEP++;
if((MENU_CHECK_STEP == 3) || (MENU_CHECK_STEP == 5))
{
step_check = 1;
}
}
if(MENU_CHECK_STEP > 9)
{
MENU_CHECK_STEP = 1;
......@@ -661,12 +670,15 @@ void Function_Check_Ctrl(uint32_t cmd)
switch (MENU_CHECK_STEP)
{
case 0: //仪表下电设防
RELAY_KEY_MCU = 0;
break;
case 1: //检测震动报警
RELAY_KEY_MCU = 0;
break;
case 2: //检测轮动报警
RELAY_KEY_MCU = 0;
break;
case 3: //上电指示灯自检
......@@ -678,20 +690,24 @@ void Function_Check_Ctrl(uint32_t cmd)
break;
case 5: //左转右转远光
RELAY_KEY_MCU = 0;
break;
case 6: //光感检测
RELAY_KEY_MCU = 0;
break;
case 7: //坐桶锁
RELAY_KEY_MCU = 0;
ONEKEYFlag = 2; //双击一键启动
break;
case 8: //边撑下电
RELAY_KEY_MCU = 0;
BCDD_MCU_Flag = 1;
break;
case 9: //按键
case 9:
RELAY_KEY_MCU = 1;
break;
......
......@@ -53,6 +53,7 @@ extern uint8_t ZTSVOK_A;
extern uint8_t ZTSVOK_B;
extern uint8_t RotationAlarmFlag;
extern uint8_t RotationAlarmMode;
extern uint8_t step_check;
void GeneralInfoDisp(unsigned char *p, unsigned short x, unsigned short y);
void Display_Title_Info(void);
void Display_Version_Info(uint32_t ON_OFF);
......
......@@ -2,6 +2,7 @@
#include "Barcode_Scanner.h"
#include "string.h"
#include "Key.h"
#include "Display_Info.h"
uint8_t barcode_Msg[64];
uint8_t barcode_Msg1[64];
uint8_t name1 = 0;
......@@ -1156,6 +1157,10 @@ uint32_t R485_Send_test(void)
if(AutoLampState) //1自动大灯开启,0熄灭
{
BCMLED.Sig.AutoLamp = 0x01; //自动大灯
if(step_check == 0)
{
step_check = 1;
}
}
else
{
......
......@@ -353,9 +353,26 @@ void KeyBackServic(void)
FanHui = 0;
}
}
uint8_t delay2stime;
//100ms时间片中使用
void Delay2s(void)
{
if(step_check == 1)
{
if(delay2stime <= 30)
{
delay2stime++;
}
else
{
delay2stime = 0;
step_check = 2;
}
}
}
void Sys_Run_Mode_100ms_Tasks_Group(void)
{
// Aima_SLF(1,1,1,1);
Delay2s(); //当前步骤检测内容触发后延时2s下一步
Display_PageNum();
ONE_KEY_Display();
RotationAlarm();
......
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