|
|
@ -16,6 +16,7 @@ |
|
|
#include "robot_move_actions.h" |
|
|
#include "robot_move_actions.h" |
|
|
|
|
|
|
|
|
#include "fsm_state_control.h" |
|
|
#include "fsm_state_control.h" |
|
|
|
|
|
#include "paint_robot_old.h" |
|
|
|
|
|
|
|
|
#define success 1 |
|
|
#define success 1 |
|
|
#define fail 0 |
|
|
#define fail 0 |
|
|
@ -191,7 +192,9 @@ void decode_command_and_feedback(uint8_t *buffer, uint16_t length, char sendWay, |
|
|
RS_485_3_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
RS_485_3_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
RS_485_4_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
RS_485_4_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
E28_SBUS_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
E28_SBUS_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
|
|
|
#if defined (hlpuart1Exit) |
|
|
LPUART1_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
LPUART1_UART_Handler.dispacherController->Dispacher_Enable = 0; |
|
|
|
|
|
#endif |
|
|
InterCall_DEBUG_UART_Handler.dispacherController->Dispacher_Enable = |
|
|
InterCall_DEBUG_UART_Handler.dispacherController->Dispacher_Enable = |
|
|
0; |
|
|
0; |
|
|
LTE_7S0_Serial_UART_Handler.dispacherController->Dispacher_Enable = |
|
|
LTE_7S0_Serial_UART_Handler.dispacherController->Dispacher_Enable = |
|
|
@ -264,7 +267,7 @@ void decode_command_and_feedback(uint8_t *buffer, uint16_t length, char sendWay, |
|
|
&buffer[length - decoded_Cmd.Buff_Data_Length], |
|
|
&buffer[length - decoded_Cmd.Buff_Data_Length], |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
|
|
|
|
|
|
calbriation = MB_CRC16(&ReceivedData, |
|
|
calbriation = MB_CRC16((uint8_t *)&ReceivedData, |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
|
|
|
|
|
|
if (calbriation == decoded_Cmd.Parameter4) //Parameter4是校验
|
|
|
if (calbriation == decoded_Cmd.Parameter4) //Parameter4是校验
|
|
|
@ -272,7 +275,7 @@ void decode_command_and_feedback(uint8_t *buffer, uint16_t length, char sendWay, |
|
|
|
|
|
|
|
|
if (downloadCount == decoded_Cmd.Parameter3) |
|
|
if (downloadCount == decoded_Cmd.Parameter3) |
|
|
{ |
|
|
{ |
|
|
QSPI_W25Qx_Write_Buffer(&decoded_Cmd.Buff_Data, |
|
|
QSPI_W25Qx_Write_Buffer((uint8_t *)&decoded_Cmd.Buff_Data, |
|
|
CODE_DOWNLOAD_FLASH_BEGIN_ADDRESS |
|
|
CODE_DOWNLOAD_FLASH_BEGIN_ADDRESS |
|
|
+ decoded_Cmd.Parameter3, |
|
|
+ decoded_Cmd.Parameter3, |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
decoded_Cmd.Buff_Data_Length); |
|
|
|