From f78d27fe359153b8d956fff1233d9d936fcbeb47 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Mon, 26 Oct 2026 11:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8A=E8=80=B3=E5=88=87=E5=89=B2=E3=80=90?= =?UTF-8?q?=E8=B0=83=E9=80=9A=E6=89=93=E6=A0=87=E3=80=91=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=89=93=E7=A3=A8=E7=94=B5=E6=9C=BA=E8=B0=83=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BASE/Src/MSP/msp_Strong_grinding_machine.c | 6 +++--- .../BHBF_Robot_Lifting_Lug/Core/Src/FSM.c | 14 +++++++------- .../Core/Src/robot_state.c | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) 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)