diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_Strong_grinding_machine.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_Strong_grinding_machine.c index b02a256..aeceb96 100644 --- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_Strong_grinding_machine.c +++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_Strong_grinding_machine.c @@ -31,8 +31,8 @@ void strong_grinding_machine_intialize(struct UARTHandler *Handler) // 测试,转速20rpm const uint8_t strong_grinding_machine_set_speed_cmd[8] = {0x01, 0x06, 0x00, 0x02, 0x00, 0x14, 0x28, 0x05}; -const uint8_t strong_grinding_machine_start_cmd[8] = {0x01, 0x06, 0x00, 0x01, 0x08, 0x82, 0x5F, 0xAB}; -const uint8_t strong_grinding_machine_stop_cmd[8] = {0x01, 0x06, 0x00, 0x01, 0x08, 0x81, 0x1F, 0xAA}; +const uint8_t strong_grinding_machine_start_cmd[8] = {0x01, 0x06, 0x20, 0x00, 0x00, 0x01, 0x43, 0xCA}; +const uint8_t strong_grinding_machine_stop_cmd[8] = {0x01, 0x06, 0x20, 0x00, 0x00, 0x00, 0x82, 0x0A}; static uint8_t strong_grinding_machine_cmd_flag = 0; uint8_t strong_grinding_machine_cmd = 0; @@ -48,7 +48,7 @@ void Strong_grinding_machine_cmd(void) case 0: MB_WriteHoldingReg(&Strong_grinding_machine_handler->Tx_Buf, Strong_grinding_machine_handler->TxCount, - 0x01, 0x0002, strong_grinding_machine_speed); + 0x01, 0x4000, strong_grinding_machine_speed); // Strong_grinding_machine_handler->TxCount = 8; // memcpy(&Strong_grinding_machine_handler->Tx_Buf, &strong_grinding_machine_set_speed_cmd, Strong_grinding_machine_handler->TxCount); Strong_grinding_machine_handler->AddSendList(Strong_grinding_machine_handler, Strong_grinding_machine_handler->Tx_Buf, Strong_grinding_machine_handler->TxCount, diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c index 8bdbd5c..ac818b5 100644 --- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c +++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c @@ -399,9 +399,9 @@ void Automatic_Operation() uint8_t IsAllowRotation = 1; void Strong_Grinding_Machine_Control() { - IsAllowRotation = Knife_Detection(); - if(IsAllowRotation == 1) - { +// IsAllowRotation = Knife_Detection(); +// if(IsAllowRotation == 1) +// { if(GV.MK32_Key.CH6_SC == -1000) { StrongGrindingMachineCurrentState = STRONG_GRINDING_MACHINE_MOTION_STATE; @@ -410,10 +410,10 @@ void Strong_Grinding_Machine_Control() StrongGrindingMachineCurrentState = STRONG_GRINDING_MACHINE_HALT_STATE; } - } - else{ - StrongGrindingMachineCurrentState = STRONG_GRINDING_MACHINE_HALT_STATE; - } +// } +// else{ +// StrongGrindingMachineCurrentState = STRONG_GRINDING_MACHINE_HALT_STATE; +// } } diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/robot_state.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/robot_state.c index 6ccb4ea..d33bbad 100644 --- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/robot_state.c +++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/robot_state.c @@ -516,15 +516,15 @@ extern int Knife_Detection(void); void Strong_Grinding_Machine_Motion_State_Do(void) { - IsAllowRotation = Knife_Detection(); - if(IsAllowRotation == 1) - { +// IsAllowRotation = Knife_Detection(); +// if(IsAllowRotation == 1) +// { strong_grinding_machine_cmd = 1; - } - else - { - strong_grinding_machine_cmd = 0; - } +// } +// else +// { +// strong_grinding_machine_cmd = 0; +// } } void auto_forward_state_do(void)