Browse Source

老代码通过C99编译

master
Lizongdi 1 day ago
parent
commit
ed7dad5d73
  1. 1
      project_old/paint_robot_old/BASE/Inc/BSP/bsp_UART.h
  2. 4
      project_old/paint_robot_old/BASE/Src/BSP/bsp_EEPROM.c
  3. 1
      project_old/paint_robot_old/BASE/Src/BSP/bsp_TIMER.c
  4. 1
      project_old/paint_robot_old/BASE/Src/BSP/bsp_UDP.c
  5. 2
      project_old/paint_robot_old/BASE/Src/BSP/bsp_cpu_flash.c
  6. 7
      project_old/paint_robot_old/BASE/Src/BSP/bsp_decode_command.c
  7. 4
      project_old/paint_robot_old/BASE/Src/BSP/tcp_server.c
  8. 1
      project_old/paint_robot_old/FSM/Src/change_line_control.c
  9. 1
      project_old/paint_robot_old/FSM/Src/fsm_state_control.c
  10. 1
      project_old/paint_robot_old/FSM/Src/motors_power_action.c
  11. 1
      project_old/paint_robot_old/FSM/Src/paint_gun_action.c

1
project_old/paint_robot_old/BASE/Inc/BSP/bsp_UART.h

@ -6,6 +6,7 @@
#include "BSP/bsp_include.h"
#include "main.h"
#include "bsp_Error.pb.h"
#include "paint_robot_old.h"
#define UART_Transmit_MAX_NUM 1024
#define UART_Receive_MAX_NUM 100

4
project_old/paint_robot_old/BASE/Src/BSP/bsp_EEPROM.c

@ -527,7 +527,7 @@ CV_struct_define GF_BSP_EEPROM_Get_CV(void)
{
CV_struct_define cv= {0};
//char buffer[sizeof(CV_struct_define)];
GF_BSP_EEPROM_ReadBytes(&cv, GF_BSP_EEPROM_CV_struct_define_Start_Address, sizeof(CV_struct_define));
GF_BSP_EEPROM_ReadBytes((uint8_t *)&cv, GF_BSP_EEPROM_CV_struct_define_Start_Address, sizeof(CV_struct_define));
return cv;
}
@ -542,7 +542,7 @@ IAP_struct_define GF_BSP_EEPROM_Get_IAP(void)
{
IAP_struct_define iap= {0};
GF_BSP_EEPROM_ReadBytes(&iap, IAP_struct_define_Start_Address, sizeof(IAP_struct_define));
GF_BSP_EEPROM_ReadBytes((uint8_t *)&iap, IAP_struct_define_Start_Address, sizeof(IAP_struct_define));
return iap;
}

1
project_old/paint_robot_old/BASE/Src/BSP/bsp_TIMER.c

@ -5,6 +5,7 @@
* Author: shiya
*/
#include "BSP/bsp_TIMER.h"
#include "lwip.h"
#include "BSP/bsp_mqtt.h"

1
project_old/paint_robot_old/BASE/Src/BSP/bsp_UDP.c

@ -13,6 +13,7 @@
#include "bsp_DLT_Log.h"
#include <bsp_UpperComputer_Handler.h>
#include "BSP/bsp_GPIO.h"
#include "BSP/bsp_decode_command.h"
void UDP_GV_Dispatch();
void UDP_IV_Dispatch();
void udp_cmd_send_GV(char *pData, uint16_t Size);

2
project_old/paint_robot_old/BASE/Src/BSP/bsp_cpu_flash.c

@ -468,7 +468,7 @@ void Copy_Peripheral_Download_Flash_to_App_Start(uint32_t totalBytes)
//App_Download_Addr
//Read 32 bytes
QSPI_W25Qx_Read_Buffer(&readData,CODE_DOWNLOAD_FLASH_BEGIN_ADDRESS+startIndex*sizeof(readData),256);
QSPI_W25Qx_Read_Buffer((uint8_t *)&readData,CODE_DOWNLOAD_FLASH_BEGIN_ADDRESS+startIndex*sizeof(readData),256);
HAL_Delay(10);
//retult= bsp_ReadCpuFlash(App_Download_Addr+startIndex*sizeof(readData),readData,sizeof(readData));
//ucState = bsp_WriteCpuFlash((uint32_t)(AppAddr + TotalSize), (uint8_t *)&g_Can2RxData[8], RecSize);

7
project_old/paint_robot_old/BASE/Src/BSP/bsp_decode_command.c

@ -16,6 +16,7 @@
#include "robot_move_actions.h"
#include "fsm_state_control.h"
#include "paint_robot_old.h"
#define success 1
#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_4_UART_Handler.dispacherController->Dispacher_Enable = 0;
E28_SBUS_UART_Handler.dispacherController->Dispacher_Enable = 0;
#if defined (hlpuart1Exit)
LPUART1_UART_Handler.dispacherController->Dispacher_Enable = 0;
#endif
InterCall_DEBUG_UART_Handler.dispacherController->Dispacher_Enable =
0;
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],
decoded_Cmd.Buff_Data_Length);
calbriation = MB_CRC16(&ReceivedData,
calbriation = MB_CRC16((uint8_t *)&ReceivedData,
decoded_Cmd.Buff_Data_Length);
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)
{
QSPI_W25Qx_Write_Buffer(&decoded_Cmd.Buff_Data,
QSPI_W25Qx_Write_Buffer((uint8_t *)&decoded_Cmd.Buff_Data,
CODE_DOWNLOAD_FLASH_BEGIN_ADDRESS
+ decoded_Cmd.Parameter3,
decoded_Cmd.Buff_Data_Length);

4
project_old/paint_robot_old/BASE/Src/BSP/tcp_server.c

@ -17,7 +17,7 @@ static err_t tcp_accept_cb(void *arg, struct tcp_pcb *newpcb, err_t err);
static err_t tcp_recv_cb(void *arg, struct tcp_pcb *tpcb, struct pbuf *p,
err_t err);
static void tcp_err_cb(void *arg, err_t err);
static void tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len);
static err_t tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len);
SendDataNode *pTcpHead = NULL; /*初始化链表头指针,使其为空*/
void tcp_server_timer_callback();
char listIndex = 0;
@ -202,7 +202,7 @@ static void tcp_err_cb(void *arg, err_t err)
}
// 数据发送完成回调
static void tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len)
static err_t tcp_sent_cb(void *arg, struct tcp_pcb *tpcb, u16_t len)
{
LWIP_UNUSED_ARG(arg);
LWIP_UNUSED_ARG(tpcb);

1
project_old/paint_robot_old/FSM/Src/change_line_control.c

@ -6,6 +6,7 @@
*/
#include "change_line_control.h"
#include "BHBF_ROBOT.h"
#include "paint_robot_old.h"
#define Veritical_To_Left_Flag 1
#define Veritical_To_Right_Flag 2

1
project_old/paint_robot_old/FSM/Src/fsm_state_control.c

@ -17,6 +17,7 @@
#include "motors_power_action.h"
#include "fsm_state_control.h"
#include "robot_move_actions.h"
#include "paint_robot_old.h"
#define M_PI 3.14159265358979323846
#define Move_Horizontal_AngleThreshold_D 85

1
project_old/paint_robot_old/FSM/Src/motors_power_action.c

@ -6,6 +6,7 @@
*/
#include "motors_power_action.h"
#include "motors.h"
#include "paint_robot_old.h"
transition_t current_motor_power_state;

1
project_old/paint_robot_old/FSM/Src/paint_gun_action.c

@ -7,6 +7,7 @@
#include "paint_gun_action.h"
#include "fsm_state.h"
#include "BHBF_ROBOT.h"
#include "paint_robot_old.h"
transition_t current_paintgun_state; /*transition_t 成员是 指针的 transition_state_t */
transition_state_t paintgun_on_state={PaintGun_ON_Enter,PaintGun_ON_Do,NULL}; /* State 成员,它会被默认初始化为 0 */

Loading…
Cancel
Save