|
|
|
@ -13,6 +13,7 @@ |
|
|
|
#include "robot_state.h" |
|
|
|
#include "bsp_TIMER.h" |
|
|
|
#include "msp_Strong_grinding_machine.h" |
|
|
|
#include "msp_LeiSai_485.h" |
|
|
|
|
|
|
|
|
|
|
|
void action_perfrom(transition_t transitions[], int length, int state); |
|
|
|
@ -460,12 +461,12 @@ void Frontend_Control() |
|
|
|
CurrentFrontEndState = Manual_UP_STATE; |
|
|
|
return; |
|
|
|
} |
|
|
|
else if(P_MK32->CH3_LY_H > 100) |
|
|
|
else if(P_MK32->CH0_RY_H > 100) |
|
|
|
{ |
|
|
|
// 右转
|
|
|
|
if((angle >= -45) && (angle <=45)) |
|
|
|
{ |
|
|
|
|
|
|
|
LS_485Motors_Speed = 100; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -478,16 +479,18 @@ void Frontend_Control() |
|
|
|
// 左转
|
|
|
|
else if(((angle > 135) && (angle <= 180)) || (angle < -135) && (angle >= -179)) |
|
|
|
{ |
|
|
|
|
|
|
|
LS_485Motors_Speed = -100; |
|
|
|
return; |
|
|
|
} |
|
|
|
else { |
|
|
|
LS_485Motors_Speed = 0; |
|
|
|
CurrentFrontEndState = HALT_STATE; |
|
|
|
} |
|
|
|
} |
|
|
|
// 低速控制前端雷赛电机
|
|
|
|
else if(GV.MK32_Key.CH5_SB == -1000) |
|
|
|
{ |
|
|
|
LS_485Motors_Speed = 0; |
|
|
|
// 前进
|
|
|
|
if((angle >= 45) && (angle <= 135)) |
|
|
|
{ |
|
|
|
@ -521,6 +524,7 @@ void Frontend_Control() |
|
|
|
|
|
|
|
} |
|
|
|
else{ |
|
|
|
LS_485Motors_Speed = 0; |
|
|
|
// 前进
|
|
|
|
if((angle >= 45) && (angle <= 135)) |
|
|
|
{ |
|
|
|
|