yincheng.zhong
2023-05-19 2282565d21c56b84c4446485b58874841f0482eb
Src/main.c
@@ -137,6 +137,7 @@
u16 current_time;
float motor5s_timer=1000;
uint8_t state5v,motorskip_flag;
extern uint8_t outside_count;
void IdleTask(void)
{
   
@@ -158,12 +159,12 @@
    //motor_state = 1;
if(g_com_map[MOTOR_ENABLE])
{
    static u8 motor5s_state = 0,outside_count=0;
   static u8 motor5s_state = 0;
    if(motorskip_flag==0)
    {
        if(motor_state==2)
        { 
            outside_count =0;
            if(motor5s_state)
            {
                if(motor5s_timer>4)
@@ -181,14 +182,14 @@
                } 
            }
        }else{
            if(outside_count++>3)
            if(outside_count>3)
            {
                motor5s_state = 1;
                motor5s_timer = 0;
                motor5s_state = 0;
                motor5s_timer = 900;
            }                
        }
    }else{
        if(motor5s_timer>7200)  //2个小时 7200
        if(motor5s_timer>7200)  //2??? 7200
        {
           motorskip_flag = 0;
           motor5s_timer = 1000; 
@@ -314,7 +315,7 @@
   hardware_pici= STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+2);
   hardware_type= STMFLASH_ReadHalfWord(FLASH_HARDWARE_VERSION_MAP+4);
   //deca_sleep(1000);
   g_com_map[VERSION] = (2<<8)|8;
   g_com_map[VERSION] = (2<<8)|9;
    
//   g_com_map[DEV_ID]=0x7;
#ifdef DEBUG_MODE