yincheng.zhong
2023-03-22 8aa49449ae60d1232c9d029e5b8b0ada2ae6346c
Src/application/dw_app.c
@@ -825,12 +825,7 @@
   recbase_num=0;
//   motor_state=0;
    if(motor_state!=0&&motor_state!=3)
    {
        motor_flag = 1;
    }else{
        motor_flag = 0;
    }
   
   tx_near_msg[BATTARY_IDX] = bat_percent;
   tx_near_msg[BUTTON_IDX] = userkey_state|stationary_flag<<1|gotosleep_flag<<2|motor_flag<<5;
@@ -968,8 +963,7 @@
                           mainbase_dist=temp_dist;
                                    nearbase_distlist[0] = temp_dist;
                                    base_mindist = temp_dist;
                           if((rx_buffer[MOTORSTATE_INDEX]&0xf)!=3)
                              motor_state=rx_buffer[MOTORSTATE_INDEX]&0xf;
                                    if(frame_len==28)
                                     {
                                         memcpy(&rec_maxrangelen,&rx_buffer[MAXRANGE_DISTANCE],2);
@@ -1300,6 +1294,7 @@
          //  Poll();
            break;
   }
    FZNearPoll();
     userkey_state = !GET_USERKEY;
   dwt_entersleep();
}