| | |
| | | if(g_com_map[MOTOR_ENABLE]) |
| | | { |
| | | |
| | | if(motor_keeptime>0) |
| | | { |
| | | motor_state = 2; |
| | | }else{ |
| | | motor_state = 0; |
| | | } |
| | | // if(motor_keeptime>0) |
| | | // { |
| | | // motor_state = 2; |
| | | // }else{ |
| | | // motor_state = 0; |
| | | // } |
| | | //motor_state=2; |
| | | switch(motor_state) |
| | | {case 0: |
| | |
| | | { |
| | | static uint8_t i=0; |
| | | SystemClock_Config(); |
| | | |
| | | // current_slotnum++; |
| | | // SetNextPollTime(tagslotpos); |
| | | if(tag_frequency>1) |
| | | { |
| | | g_start_send_flag=1; |
| | | }else{ |
| | | if(current_slotpos>=max_slotpos) |
| | | { |
| | | GetRandomPos(); |
| | |
| | | { |
| | | current_sync_sec=0; |
| | | } |
| | | } |
| | | nomove_count+=1/(float)tag_frequency; |
| | | if(motor_keeptime>0) |
| | | { |