diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/.settings/language.settings.xml b/diaoerqiege/BHBF_Robot_Lifting_Lug/.settings/language.settings.xml
index 29c5333..9ed3a24 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/.settings/language.settings.xml
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/BHBF_Robot_Lifting_Lug.ioc b/diaoerqiege/BHBF_Robot_Lifting_Lug/BHBF_Robot_Lifting_Lug.ioc
index 445adbe..2204098 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/BHBF_Robot_Lifting_Lug.ioc
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/BHBF_Robot_Lifting_Lug.ioc
@@ -878,7 +878,7 @@ USART3.FIFOMode=FIFOMODE_ENABLE
USART3.IPParameters=VirtualMode-Asynchronous,DMADisableonRxErrorParam,OverrunDisableParam,FIFOMode,BaudRate
USART3.OverrunDisableParam=ADVFEATURE_OVERRUN_DISABLE
USART3.VirtualMode-Asynchronous=VM_ASYNC
-USART6.BaudRate=115200
+USART6.BaudRate=9600
USART6.DMADisableonRxErrorParam=ADVFEATURE_DMA_ENABLEONRXERROR
USART6.FIFOMode=FIFOMODE_ENABLE
USART6.IPParameters=VirtualMode,OverrunDisableParam,FIFOMode,DMADisableonRxErrorParam,BaudRate,SwapParam
diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Inc/MSP/msp_LeiSai_485.h b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Inc/MSP/msp_LeiSai_485.h
index c596123..68d7c22 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Inc/MSP/msp_LeiSai_485.h
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Inc/MSP/msp_LeiSai_485.h
@@ -11,6 +11,6 @@
-extern uint8_t LS_485Motors_Speed;
+extern int16_t LS_485Motors_Speed;
#endif /* BASE_INC_MSP_MSP_LEISAI_485_H_ */
diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_LeiSai_485.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_LeiSai_485.c
index d178b8e..53c25ac 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_LeiSai_485.c
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/MSP/msp_LeiSai_485.c
@@ -12,8 +12,8 @@
struct UARTHandler *LS_485Motors_handler;
DispacherController *LS_485Motors_dispacherController;
-uint8_t LS_485Motors_slave_id = 0x00; //默认为0 广播形式
-uint8_t LS_485Motors_Speed=0;
+uint8_t LS_485Motors_slave_id = 0x01; //默认为0 广播形式
+int16_t LS_485Motors_Speed=0;
uint8_t speedModeSet=1;
void LS_485Motor_loop();
diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c
index 194e003..1ecf7d4 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c
@@ -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,13 +461,13 @@ 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))
{
-
- return;
+ 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))
{
diff --git a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/usart.c b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/usart.c
index d7f9fdf..1256b6c 100644
--- a/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/usart.c
+++ b/diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/usart.c
@@ -372,7 +372,7 @@ void MX_USART6_UART_Init(void)
/* USER CODE END USART6_Init 1 */
huart6.Instance = USART6;
- huart6.Init.BaudRate = 115200;
+ huart6.Init.BaudRate = 9600;
huart6.Init.WordLength = UART_WORDLENGTH_8B;
huart6.Init.StopBits = UART_STOPBITS_1;
huart6.Init.Parity = UART_PARITY_NONE;