diff --git a/Bingoo/base/BHBF_ROBOT.c b/Bingoo/base/BHBF_ROBOT.c index 9d340ca..068e22b 100644 --- a/Bingoo/base/BHBF_ROBOT.c +++ b/Bingoo/base/BHBF_ROBOT.c @@ -4,7 +4,7 @@ * Created on: Oct 26, 2023 * Author: shiya */ -#include "fsm.h" +//#include "fsm.h" #include "BHBF_ROBOT.h" #include @@ -101,6 +101,8 @@ bool CompareTimer(int32_t DelayMiliSeconds,Sys_timer_handler * timer_handler) } } + +#if 0 bool CompareTimer_Delay(int32_t Delay) { @@ -118,6 +120,8 @@ bool CompareTimer_Delay(int32_t Delay) } } + +#endif /*m/min--->0.1m/min 其实就是×10*/ int32_t speed_M_min_toE01_M_min(int32_t speedm_min) { diff --git a/Bingoo/base/Handset_Status_Setting.c b/Bingoo/base/Handset_Status_Setting.c index 5718025..0dc32de 100644 --- a/Bingoo/base/Handset_Status_Setting.c +++ b/Bingoo/base/Handset_Status_Setting.c @@ -178,7 +178,7 @@ static InputEvent CalculateRockerEvent(void) { int16_t vert = P_MK32->CH2_LY_V; int16_t hori = P_MK32->CH3_LY_H; - int16_t swing = P_MK32->CH0_RY_H; + //int16_t swing = P_MK32->CH0_RY_H; // 摇杆中位判断 if ((fabs(vert) < ROCKER_THRESHOLD_DEFAULT) && (fabs(hori) < ROCKER_THRESHOLD_DEFAULT)) diff --git a/Bingoo/base/bsp_EEPROM.c b/Bingoo/base/bsp_EEPROM.c index 2d1c6f1..7b34a49 100644 --- a/Bingoo/base/bsp_EEPROM.c +++ b/Bingoo/base/bsp_EEPROM.c @@ -4,7 +4,7 @@ * Created on: Oct 26, 2023 * Author: shiya */ -#include "BSP/bsp_EEPROM.h" +#include "bsp_EEPROM.h" void bsp_InitI2C(void); void i2c_Start(void); @@ -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; } diff --git a/Bingoo/base/bsp_GPIO.c b/Bingoo/base/bsp_GPIO.c index 8a77775..8e9cd09 100644 --- a/Bingoo/base/bsp_GPIO.c +++ b/Bingoo/base/bsp_GPIO.c @@ -4,7 +4,7 @@ * Created on: Oct 26, 2023 * Author: shiya */ -#include "BSP/bsp_GPIO.h" +#include "bsp_GPIO.h" uint8_t GF_BSP_GPIO_Init() { @@ -47,6 +47,7 @@ void GF_BSP_GPIO_SetIO(uint8_t IO_Index,uint8_t Level) } } +#if 0 uint8_t GF_BSP_GPIO_ToggleIO(uint8_t IO_Index) { @@ -74,7 +75,7 @@ uint8_t GF_BSP_GPIO_ToggleIO(uint8_t IO_Index) } - +#endif uint8_t GF_BSP_GPIO_ReadIO(uint8_t IO_Index) { diff --git a/Bingoo/base/bsp_INTERCALL.c b/Bingoo/base/bsp_INTERCALL.c index 8c5a95c..966d999 100644 --- a/Bingoo/base/bsp_INTERCALL.c +++ b/Bingoo/base/bsp_INTERCALL.c @@ -4,7 +4,7 @@ * Created on: 2023年11月8日 * Author: shiya */ -#include "BSP/bsp_include.h" +#include "bsp_include.h" typedef struct { diff --git a/Bingoo/base/bsp_MB_host.c b/Bingoo/base/bsp_MB_host.c index af33fc9..9c6250c 100644 --- a/Bingoo/base/bsp_MB_host.c +++ b/Bingoo/base/bsp_MB_host.c @@ -1,6 +1,6 @@ #include "bsp_MB_host.h" #include "stdio.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" diff --git a/Bingoo/base/bsp_TCPClient.c b/Bingoo/base/bsp_TCPClient.c index b96347b..e6a6343 100644 --- a/Bingoo/base/bsp_TCPClient.c +++ b/Bingoo/base/bsp_TCPClient.c @@ -1,4 +1,4 @@ -#include "BSP/bsp_TCPClient.h" +#include "bsp_TCPClient.h" #include "lwip/netif.h" #include "lwip/ip.h" #include "lwip/tcp.h" @@ -165,7 +165,7 @@ static err_t client_connected(void *arg, struct tcp_pcb *pcb, err_t err) void TCP_Client_Init(void) { - ReadLazorData = &ReceivedData[25]; + ReadLazorData = (LazorData *)&ReceivedData[25]; Weld_Out_Flag = &ReceivedData[11]; diff --git a/Bingoo/base/bsp_TIMER.c b/Bingoo/base/bsp_TIMER.c index 4ee2128..a2c484f 100644 --- a/Bingoo/base/bsp_TIMER.c +++ b/Bingoo/base/bsp_TIMER.c @@ -4,9 +4,9 @@ * Created on: Oct 26, 2023 * Author: shiya */ -#include "BSP/bsp_TIMER.h" +#include "bsp_TIMER.h" #include "lwip.h" -#include "BSP/bsp_mqtt.h" +#include "bsp_mqtt.h" //返回值::1-正常;0-错误 uint8_t GF_BSP_TIMER_Init() diff --git a/Bingoo/base/bsp_UART.c b/Bingoo/base/bsp_UART.c index 746310d..d634b95 100644 --- a/Bingoo/base/bsp_UART.c +++ b/Bingoo/base/bsp_UART.c @@ -1,4 +1,4 @@ -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" #include "main.h" #include diff --git a/Bingoo/base/bsp_UDP.c b/Bingoo/base/bsp_UDP.c index 10ca979..85f16c4 100644 --- a/Bingoo/base/bsp_UDP.c +++ b/Bingoo/base/bsp_UDP.c @@ -12,7 +12,8 @@ #include "bsp_UDP.h" #include "bsp_DLT_Log.h" #include -#include "BSP/bsp_GPIO.h" +#include "bsp_GPIO.h" +#include "bsp_decode_command.h" void UDP_GV_Dispatch(); void UDP_IV_Dispatch(); void udp_cmd_send_GV(char *pData, uint16_t Size); @@ -132,7 +133,7 @@ void udp_dlt_send_back(char *pData, uint16_t Size) /* 发送udp数据 */ //udp_send(upcb_DLT, p); - err_t t = udp_sendto(upcb_Tx_DLT, p, &serverIP, + (void)udp_sendto(upcb_Tx_DLT, p, &serverIP, UDP_REMOTE_DLT_PORT); /* 释放缓冲区空间 */ pbuf_free(p); @@ -395,7 +396,7 @@ void UDP_GV_Dispatch() pb_ostream_t GV_o_stream = { 0 }; char buf[1024]; - GV_o_stream = pb_ostream_from_buffer(&buf[2], sizeof(buf)); + GV_o_stream = pb_ostream_from_buffer((pb_byte_t *)&buf[2], sizeof(buf)); pb_encode(&GV_o_stream, GV_struct_define_fields, &GV); buf[1] = 0xfe; buf[0] = 0xfe; diff --git a/Bingoo/base/bsp_client_setting.c b/Bingoo/base/bsp_client_setting.c index 636607e..7106b8b 100644 --- a/Bingoo/base/bsp_client_setting.c +++ b/Bingoo/base/bsp_client_setting.c @@ -9,7 +9,7 @@ #include "gpio.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" void UpdateIV(); void decode_received_data_from_client(uint8_t *buffer, uint16_t length); @@ -68,7 +68,7 @@ void decode_received_data_from_client(uint8_t *buffer, uint16_t length) if (buffer[0] == 0x55 && buffer[1] == 0x55 && length >= 4) { uint16_t crc_check = ((buffer[length - 1] << 8) | buffer[length - 2]); - uint16_t crc_check1 = MB_CRC16(buffer, length - 2); + //uint16_t crc_check1 = MB_CRC16(buffer, length - 2); /* CRC 校验正确 */ if (crc_check == MB_CRC16(buffer, length - 2)) { diff --git a/Bingoo/base/bsp_com_helper.c b/Bingoo/base/bsp_com_helper.c index c1fc03e..9e3fa1b 100644 --- a/Bingoo/base/bsp_com_helper.c +++ b/Bingoo/base/bsp_com_helper.c @@ -155,7 +155,7 @@ void PCOMHardWare_Check_t(HardWareController *uartHandler) //printf("链表为空\n"); return; } - char IsAbnornalStatus = 0; + //char IsAbnornalStatus = 0; //check invalid state while (ptr != NULL) @@ -167,7 +167,7 @@ void PCOMHardWare_Check_t(HardWareController *uartHandler) LOGFF(DL_ERROR, "connecting Error %s", ptr->Name); SET_BIT_1(SystemErrorCode,ptr->BitFlag); //*SystemErrorCode=*SystemErrorCode|(1<BitFlag); - IsAbnornalStatus = 1; + //IsAbnornalStatus = 1; }else { //*SystemErrorCode=*SystemErrorCode|(1<BitFlag); diff --git a/Bingoo/base/bsp_cpu_flash.c b/Bingoo/base/bsp_cpu_flash.c index 7d1959c..567b6aa 100644 --- a/Bingoo/base/bsp_cpu_flash.c +++ b/Bingoo/base/bsp_cpu_flash.c @@ -16,7 +16,7 @@ ********************************************************************************************************* */ -#include "BSP/bsp_cpu_flash.h" +#include "bsp_cpu_flash.h" #include /* ********************************************************************************************************* @@ -413,6 +413,7 @@ void JumpToApp(void) } } +#if 0 /* ********************************************************************************************************* * 函 数 名: JumpToApp @@ -468,7 +469,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); @@ -479,6 +480,7 @@ void Copy_Peripheral_Download_Flash_to_App_Start(uint32_t totalBytes) } +#endif void Erase_App_Download_Flash_Addr() { uint32_t startIndex=0; diff --git a/Bingoo/base/bsp_decode_command.c b/Bingoo/base/bsp_decode_command.c index dc4f2b5..8d45cdb 100644 --- a/Bingoo/base/bsp_decode_command.c +++ b/Bingoo/base/bsp_decode_command.c @@ -16,6 +16,7 @@ #include "robot_move_actions.h" #include "fsm_state_control.h" +#include "bsp_UDP.h" #define success 1 #define fail 0 diff --git a/Bingoo/base/bsp_tempature.c b/Bingoo/base/bsp_tempature.c index 74a68f7..8e20595 100644 --- a/Bingoo/base/bsp_tempature.c +++ b/Bingoo/base/bsp_tempature.c @@ -7,7 +7,7 @@ #include #include "adc.h" -#include "BSP/bsp_include.h" +#include "bsp_include.h" #include "stm32h7xx_hal_adc.h" #include diff --git a/Bingoo/base/fsm_state_control.c b/Bingoo/base/fsm_state_control.c index 4832dd4..7a415b9 100644 --- a/Bingoo/base/fsm_state_control.c +++ b/Bingoo/base/fsm_state_control.c @@ -195,6 +195,7 @@ static void horizontal_backward_group(void) static void manual_auto_group(void) { + void Move_Manual_Auto_Sub_Func(void); Move_Manual_Auto_Sub_Func(); PaintGun_Contronl_Press(); } @@ -210,6 +211,7 @@ static void horizontal_auto_group(void) static void weld_auto_group(void) { GV.Robot_Desired_Speed=-GV.Robot_Move_Speed; + void Weld_Auto_Sub_Func(void); Weld_Auto_Sub_Func(); PaintGun_Contronl_Press(); /* 若需喷枪控制,可在此添加 */ @@ -242,6 +244,7 @@ static void vertical_backward_group(void) static void vertical_auto_group(void) { // horizontal_work(); + void Move_Vertical_Auto_Sub_Func(void); Move_Vertical_Auto_Sub_Func(); PaintGun_Contronl_Press(); /* 若需喷枪控制,可在此添加 */ @@ -338,7 +341,9 @@ void GF_Dispatch(void) // 更新调试变量 g_debug_prev_mode = prev_mode; g_debug_curr_key = curr_key; + void Compensation_Update(void); Compensation_Update(); + void get_weld_data(void); get_weld_data(); } diff --git a/Bingoo/base/msp_DAM_Relay.c b/Bingoo/base/msp_DAM_Relay.c index 84f2a6a..9075cc8 100644 --- a/Bingoo/base/msp_DAM_Relay.c +++ b/Bingoo/base/msp_DAM_Relay.c @@ -5,9 +5,9 @@ * Author: akeguo */ -#include "../../BASE/Inc/MSP/msp_DAM_Relay.h" -#include "../../BASE/Inc/BSP/BHBF_ROBOT.h" -#include "../../BASE/Inc/BSP/bsp_MB_host.h" +#include "msp_DAM_Relay.h" +#include "BHBF_ROBOT.h" +#include "bsp_MB_host.h" //not modbus writcoil uint8_t Dan1_open[8] = { 0xFE, 0x05, 0x00, 0x00, 0xFF, 0x00, 0x98, 0x35 }; diff --git a/Bingoo/base/msp_MK32_1.c b/Bingoo/base/msp_MK32_1.c index 40277fe..2daeb44 100644 --- a/Bingoo/base/msp_MK32_1.c +++ b/Bingoo/base/msp_MK32_1.c @@ -4,7 +4,7 @@ * Created on: Oct 8, 2024 * Author: akeguo */ -#include "MSP/msp_MK32_1.h" +#include "msp_MK32_1.h" #include "BHBF_ROBOT.h" char Is_All_Button_Reset = 0; diff --git a/Bingoo/base/msp_TL720D.c b/Bingoo/base/msp_TL720D.c index 235fcf5..8fb0314 100644 --- a/Bingoo/base/msp_TL720D.c +++ b/Bingoo/base/msp_TL720D.c @@ -5,7 +5,7 @@ * Author: bihon */ -#include "MSP/msp_TL720D.h" +#include "msp_TL720D.h" #include "BHBF_ROBOT.h" #include "msp_TL720D.pb.h" diff --git a/Bingoo/base/msp_TTMotor_ZQ.c b/Bingoo/base/msp_TTMotor_ZQ.c index f97e959..d863e0e 100644 --- a/Bingoo/base/msp_TTMotor_ZQ.c +++ b/Bingoo/base/msp_TTMotor_ZQ.c @@ -207,6 +207,7 @@ void TT_SpeedMode_Set_TargetSpeed(uint32_t MotorID, ZQ_Motor_Controller, WaitTime); } +#if 0 void Swing_Motor_Set_Target_Position() { CANSendMessageSDO(SwingMotorID, 0x40, 0x6041, 0x00, 0x00); ///:是否到达目的位置 @@ -217,6 +218,7 @@ void Swing_Motor_Read_ReachedEnd() CANSendMessageSDO(SwingMotorID, 0x40, 0x6041, 0x00, 0x00); ///:是否到达目的位置 } +#endif void Set_Current_Positon_Zero(uint8_t MotorID, FDCANHandler *ZQ_Motor_Controller, int32_t WaitTime) // Home 设置当前位置为零点 diff --git a/Bingoo/base/msp_WH_LTE_7S0.c b/Bingoo/base/msp_WH_LTE_7S0.c index 5e8e5da..86073a8 100644 --- a/Bingoo/base/msp_WH_LTE_7S0.c +++ b/Bingoo/base/msp_WH_LTE_7S0.c @@ -3,7 +3,7 @@ #include "bsp_decode_command.h" #include "gpio.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" #include diff --git a/Bingoo/base/msp_ground_management.c b/Bingoo/base/msp_ground_management.c index 993cc8a..202f5e5 100644 --- a/Bingoo/base/msp_ground_management.c +++ b/Bingoo/base/msp_ground_management.c @@ -57,25 +57,25 @@ void ground_management_inquiry() dataToSend[7] = SWAP_ENDIAN_16( (uint16_t ) ground_management_value->Time_Out_Period); - MB_WriteNumHoldingReg(&ground_management_handler->Tx_Buf, - &ground_management_handler->TxCount, ground_management_slave_id, 0, - 8, dataToSend); + MB_WriteNumHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, + (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 0, + 8, (uint8_t *)dataToSend); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, ground_management_handler->TxCount, OneLineWaitTime, NULL); /***********寄存器8写德玛克电机速度*****************************/ - MB_WriteHoldingReg(&ground_management_handler->Tx_Buf, - &ground_management_handler->TxCount, ground_management_slave_id, + MB_WriteHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, + (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 8, GV.GroundManagementValue.DMK_Speed); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, ground_management_handler->TxCount, OneLineWaitTime, NULL); /***********寄存器9写德玛克电机状态*****************************/ - MB_WriteHoldingReg(&ground_management_handler->Tx_Buf, - &ground_management_handler->TxCount, ground_management_slave_id, + MB_WriteHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, + (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 9, GV.GroundManagementValue.DMK_WorkState); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, @@ -85,16 +85,16 @@ void ground_management_inquiry() if (ground_management_value->Save_To_Flash == 1) { /******************写寄存器7超时时间**************************/ - MB_WriteHoldingReg(&ground_management_handler->Tx_Buf, - &ground_management_handler->TxCount, ground_management_slave_id, + MB_WriteHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, + (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 7, (uint16_t)ground_management_value->Time_Out_Period); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, ground_management_handler->TxCount, OneLineWaitTime, NULL); /***************************寄存器10 写入55保存数据*************************************/ - MB_WriteHoldingReg(&ground_management_handler->Tx_Buf, - &ground_management_handler->TxCount, ground_management_slave_id, + MB_WriteHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, + (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 10, 55); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, @@ -104,7 +104,7 @@ void ground_management_inquiry() } - MB_ReadHoldingReg(&ground_management_handler->Tx_Buf, &ground_management_handler->TxCount, ground_management_slave_id, 0, + MB_ReadHoldingReg((uint8_t *)&ground_management_handler->Tx_Buf, (uint8_t *)&ground_management_handler->TxCount, ground_management_slave_id, 0, g_m_read_count); ground_management_handler->AddSendList(ground_management_handler, ground_management_handler->Tx_Buf, ground_management_handler->TxCount, OneLineWaitTime, decode_ground_management); @@ -114,6 +114,7 @@ void decode_ground_management(uint8_t *buffer, uint16_t length) { // uint8_t data1[length]; // memcpy(data1, buffer, length); + uint8_t MB_Decode_HoldingRegs(uint8_t buffer[], uint16_t length,uint16_t Read_Reg_Num,uint16_t* Decoded_Reg_Value); int decoded_result = MB_Decode_HoldingRegs(buffer, length, g_m_read_count, &decoded_ground_management_holdingReg_value[0]); if (decoded_result == 1) diff --git a/Bingoo/base/msp_strain_gauge.c b/Bingoo/base/msp_strain_gauge.c index c6762d9..c71a8f6 100644 --- a/Bingoo/base/msp_strain_gauge.c +++ b/Bingoo/base/msp_strain_gauge.c @@ -45,15 +45,15 @@ void strain_gauge_loop() // 必须要初始化 strainGaugeValue //读取力 - MB_ReadHoldingReg(&strain_gauge_handler->Tx_Buf, - &strain_gauge_handler->TxCount, strain_gauge_slave_id, 1, 1); //03 command ; read 3 registers 从1 开始 读取1个 + MB_ReadHoldingReg((uint8_t *)&strain_gauge_handler->Tx_Buf, + (uint8_t *)&strain_gauge_handler->TxCount, strain_gauge_slave_id, 1, 1); //03 command ; read 3 registers 从1 开始 读取1个 strain_gauge_handler->AddSendList(strain_gauge_handler, strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount, OneLineWaitTime, decode_strain_gauge_01); //推杆控制 - MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf, - &strain_gauge_handler->TxCount, strain_gauge_slave_id, 0, + MB_WriteHoldingReg((uint8_t *)&strain_gauge_handler->Tx_Buf, + (uint8_t *)&strain_gauge_handler->TxCount, strain_gauge_slave_id, 0, strainGaugeValue->MotorControl);//strainGaugeValue->MotorControl 电机控制,=0 停止,=1 前进,=2 后退 strain_gauge_handler->AddSendList(strain_gauge_handler, strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount, OneLineWaitTime, @@ -63,15 +63,15 @@ void strain_gauge_loop() if(SAVE_Register23==1) { /*写寄存器2 K**/ - MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf, - &strain_gauge_handler->TxCount, strain_gauge_slave_id, 2, + MB_WriteHoldingReg((uint8_t *)&strain_gauge_handler->Tx_Buf, + (uint8_t *)&strain_gauge_handler->TxCount, strain_gauge_slave_id, 2, strainGaugeValue->HX711_K); strain_gauge_handler->AddSendList(strain_gauge_handler, strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount, OneLineWaitTime, NULL); /*写寄存器3 D**/ - MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf, - &strain_gauge_handler->TxCount, strain_gauge_slave_id, 3, + MB_WriteHoldingReg((uint8_t *)&strain_gauge_handler->Tx_Buf, + (uint8_t *)&strain_gauge_handler->TxCount, strain_gauge_slave_id, 3, strainGaugeValue->HX711_D); strain_gauge_handler->AddSendList(strain_gauge_handler, strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount, OneLineWaitTime, @@ -83,8 +83,8 @@ void strain_gauge_loop() if(SAVE_Register9==1) { - MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf, - &strain_gauge_handler->TxCount, strain_gauge_slave_id, 9, + MB_WriteHoldingReg((uint8_t *)&strain_gauge_handler->Tx_Buf, + (uint8_t *)&strain_gauge_handler->TxCount, strain_gauge_slave_id, 9, strainGaugeValue->Save); strain_gauge_handler->AddSendList(strain_gauge_handler, strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount, OneLineWaitTime, @@ -101,6 +101,7 @@ void decode_strain_gauge_01(uint8_t *buffer, uint16_t length) // uint8_t data1[length]; // memcpy(data1, buffer, length); + uint8_t MB_Decode_HoldingRegs(uint8_t buffer[], uint16_t length,uint16_t Read_Reg_Num,uint16_t* Decoded_Reg_Value); int decoded_result = MB_Decode_HoldingRegs(buffer, length, 1, &decoded_strain_gauge_holdingReg_value[1]); if (decoded_result == 1) @@ -121,6 +122,7 @@ void decode_strain_gauge_09(uint8_t *buffer, uint16_t length) // uint8_t data1[100]; // memcpy(data1, buffer, length); + uint8_t MB_Decode_HoldingRegs(uint8_t buffer[], uint16_t length,uint16_t Read_Reg_Num,uint16_t* Decoded_Reg_Value); int decoded_result = MB_Decode_HoldingRegs(buffer, length, 2, &decoded_strain_gauge_holdingReg_value[9]); if (decoded_result == 1) diff --git a/Bingoo/base/robot_move_actions.c b/Bingoo/base/robot_move_actions.c index 4cfd326..1e43c8e 100644 --- a/Bingoo/base/robot_move_actions.c +++ b/Bingoo/base/robot_move_actions.c @@ -14,7 +14,7 @@ #include "fsm_state.h" #include "fsm_state_control.h" #include "paint_gun_action.h" -#include "MSP/msp_PID.h" +#include "msp_PID.h" #include "bsp_slide_averager.h" #include @@ -697,11 +697,13 @@ static void swing_start_move(void) if(present_angle>=left_compare_value+2) { swing_currentState=SWING_LEFT_MOVE; + void Move_Swing_Left_Func_Do_imm(void); Move_Swing_Left_Func_Do_imm(); } else { swing_currentState=SWING_RIGHT_MOVE; + void Move_Swing_Right_Func_Do_imm(void); Move_Swing_Right_Func_Do_imm(); } } @@ -721,7 +723,7 @@ static void swing_left_move(void) center_angle=(right_compare_updata+left_compare_updata)/2; } - + void Move_Swing_Right_Func_Do_lay(void); Move_Swing_Right_Func_Do_lay(); swing_currentState=SWING_RIGHT_MOVE; @@ -743,7 +745,7 @@ static void swing_right_move(void) center_angle=(right_compare_updata+left_compare_updata)/2; } - + void Move_Swing_Left_Func_Do_lay(void); Move_Swing_Left_Func_Do_lay(); swing_currentState=SWING_LEFT_MOVE; } @@ -883,6 +885,7 @@ static void Move_Weld_Task_Backwards_Do_Backward(void) double robotDeriAngleDegGrity=0; //GV.weld_data_X = ReadLazorData->Feature_X; float Robot_Weld_Real = GV.weld_data_X; + void GF_MSP_PID_Now_Der_adj_Com_Weld(double Current_Angle, double Desire_Angle_Input, double Auto_Speed, double Auto_Speed_Max, double System_time, double *W_Speed_1); GF_MSP_PID_Now_Der_adj_Com_Weld(Robot_Weld_Real, robotDeriAngleDegGrity, GV.Robot_Move_Speed, Deri_Speed_Robot_MAX, 0.1, Robot_Speed); GV.Left_Speed_M_min = Robot_Speed[1]; diff --git a/Bingoo/base/swing_action.c b/Bingoo/base/swing_action.c index 9cc7b61..6d0dbb9 100644 --- a/Bingoo/base/swing_action.c +++ b/Bingoo/base/swing_action.c @@ -46,6 +46,7 @@ void Robot_Swing_Operation_Function() } else { + void Move_Swing_Halt_Func_Do(void); Move_Swing_Halt_Func_Do(); } } diff --git a/Bingoo/base/tcp_server.c b/Bingoo/base/tcp_server.c index 5d17443..8393b97 100644 --- a/Bingoo/base/tcp_server.c +++ b/Bingoo/base/tcp_server.c @@ -8,7 +8,7 @@ #include "bsp_UDP.h" #include "bsp_DLT_Log.h" #include -#include "BSP/bsp_GPIO.h" +#include "bsp_GPIO.h" static client_conn_t clients[MAX_CLIENTS]; static struct tcp_pcb *server_pcb = NULL; void send_tcp(SendDataNode **head); @@ -149,7 +149,7 @@ static err_t tcp_accept_cb(void *arg, struct tcp_pcb *newpcb, err_t err) tcp_setprio(newpcb, TCP_PRIO_MIN); tcp_recv(newpcb, tcp_recv_cb); tcp_err(newpcb, tcp_err_cb); - tcp_sent(newpcb, tcp_sent_cb); + tcp_sent(newpcb, (tcp_sent_fn)tcp_sent_cb); // 保存客户端信息 clients[free_index].pcb = newpcb; diff --git a/Bingoo/include/base/BHBF_ROBOT.h b/Bingoo/include/base/BHBF_ROBOT.h index 28ed1ef..b0cd74a 100644 --- a/Bingoo/include/base/BHBF_ROBOT.h +++ b/Bingoo/include/base/BHBF_ROBOT.h @@ -20,32 +20,32 @@ #include "BHBF_ROBOT.h" #include "bsp_PV.pb.h" #include "bsp_IV.pb.h" -#include "BSP/bsp_TCPClient.h" -#include "BSP/pb.h" -#include "BSP/pb_decode.h" -#include "BSP/pb_encode.h" -#include "BSP/bsp_EEPROM.h" -#include "BSP/bsp_pb_decode_encode.h" +#include "bsp_TCPClient.h" +#include "pb.h" +#include "pb_decode.h" +#include "pb_encode.h" +#include "bsp_EEPROM.h" +#include "bsp_pb_decode_encode.h" #include "bsp_MB_host.h" -#include "BSP/bsp_include.h" -#include "BSP/bsp_UART.h" -#include "BSP/DLTuc.h" -#include "BSP/bsp_DLT_Log.h" +#include "bsp_include.h" +#include "bsp_UART.h" +#include "DLTuc.h" +#include "bsp_DLT_Log.h" -#include "BSP/bsp_cpu_flash.h" -#include "BSP/bsp_qspi_w25q128.h" -#include "BSP/bsp_UpperComputer_Handler.h" -#include "BSP/bsp_Error_Detect.h" -#include "BSP/bsp_MB_host.h" +#include "bsp_cpu_flash.h" +#include "bsp_qspi_w25q128.h" +#include "bsp_UpperComputer_Handler.h" +#include "bsp_Error_Detect.h" +#include "bsp_MB_host.h" -#include "MSP/msp_JTBATTERY.h" +#include "msp_JTBATTERY.h" -#include "MSP/msp_Force_Sensor.h" -#include "MSP/msp_TL720D.h" -#include "MSP/msp_MK32_1.h" -#include "MSP/msp_Force_Sensor.h" -#include "MSP/msp_WH_LTE_7S0.h" +#include "msp_Force_Sensor.h" +#include "msp_TL720D.h" +#include "msp_MK32_1.h" +#include "msp_Force_Sensor.h" +#include "msp_WH_LTE_7S0.h" #include "paint_gun_action.h" diff --git a/Bingoo/include/base/bsp_Error_Detect.h b/Bingoo/include/base/bsp_Error_Detect.h index 12b92d5..c355d46 100644 --- a/Bingoo/include/base/bsp_Error_Detect.h +++ b/Bingoo/include/base/bsp_Error_Detect.h @@ -12,7 +12,7 @@ /* Includes ------------------------------------------------------------------*/ #include "BHBF_ROBOT.h" #include "bsp_com_helper.h" -#include "BSP/bsp_include.h" +#include "bsp_include.h" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ diff --git a/Bingoo/include/base/bsp_MB_host.h b/Bingoo/include/base/bsp_MB_host.h index 8b6bff5..06f1a01 100644 --- a/Bingoo/include/base/bsp_MB_host.h +++ b/Bingoo/include/base/bsp_MB_host.h @@ -12,7 +12,7 @@ #define InputRegReg 0x0020 //输入寄存器 #define SWAP_ENDIAN_16(x) (((x) >> 8) | ((x) << 8)) #include "bsp_include.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" /* 扩展变量 ------------------------------------------------------------------*/ typedef struct diff --git a/Bingoo/include/base/bsp_TCPClient.h b/Bingoo/include/base/bsp_TCPClient.h index 72a1a5d..3d81266 100644 --- a/Bingoo/include/base/bsp_TCPClient.h +++ b/Bingoo/include/base/bsp_TCPClient.h @@ -57,7 +57,6 @@ typedef struct _LazorData } LazorData; extern unsigned char *Weld_Out_Flag; extern unsigned char Weld_Out_Count; -extern unsigned char Weld_Out_SafeCount; extern LazorData *ReadLazorData; void TCP_Client_Init(void); #endif /* INC_BSP_BSP_TCPCLIENT_H_ */ diff --git a/Bingoo/include/base/bsp_TIMER.h b/Bingoo/include/base/bsp_TIMER.h index 95bfc73..9f38a5c 100644 --- a/Bingoo/include/base/bsp_TIMER.h +++ b/Bingoo/include/base/bsp_TIMER.h @@ -7,7 +7,7 @@ #ifndef INC_BSP_TIMER_H_ #define INC_BSP_TIMER_H_ -#include "BSP/bsp_TCPClient.h" +#include "bsp_TCPClient.h" #include "bsp_include.h" uint8_t GF_BSP_TIMER_Init(void); diff --git a/Bingoo/include/base/bsp_UART.h b/Bingoo/include/base/bsp_UART.h index 8059730..08d0ad4 100644 --- a/Bingoo/include/base/bsp_UART.h +++ b/Bingoo/include/base/bsp_UART.h @@ -3,7 +3,7 @@ #ifndef INC_BSP_UART_H_ #define INC_BSP_UART_H_ -#include "BSP/bsp_include.h" +#include "bsp_include.h" #include "main.h" #include "bsp_Error.pb.h" #define UART_Transmit_MAX_NUM 1024 diff --git a/Bingoo/include/base/bsp_UpperComputer_Handler.h b/Bingoo/include/base/bsp_UpperComputer_Handler.h index 198b159..4a853a3 100644 --- a/Bingoo/include/base/bsp_UpperComputer_Handler.h +++ b/Bingoo/include/base/bsp_UpperComputer_Handler.h @@ -11,7 +11,7 @@ #include #include "bsp_MB_host.h" #include "stdio.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" #include "usart.h" #include "gpio.h" diff --git a/Bingoo/include/base/bsp_mqtt_pub.h b/Bingoo/include/base/bsp_mqtt_pub.h index 3764cb0..5a7f491 100644 --- a/Bingoo/include/base/bsp_mqtt_pub.h +++ b/Bingoo/include/base/bsp_mqtt_pub.h @@ -13,7 +13,7 @@ #include "pb_encode.h" #include "bsp_CV.pb.h" #include "bsp_pb_decode_encode.h" -#include "BSP/bsp_EEPROM.h" +#include "bsp_EEPROM.h" diff --git a/Bingoo/include/base/msp_JTBATTERY.h b/Bingoo/include/base/msp_JTBATTERY.h index 777a51b..afd7073 100644 --- a/Bingoo/include/base/msp_JTBATTERY.h +++ b/Bingoo/include/base/msp_JTBATTERY.h @@ -8,7 +8,7 @@ #ifndef INC_MSP_MSP_JTBATTERY_H_ #define INC_MSP_MSP_JTBATTERY_H_ -#include "BSP/bsp_include.h" +#include "bsp_include.h" diff --git a/Bingoo/include/base/msp_MK32_1.h b/Bingoo/include/base/msp_MK32_1.h index 9c48328..a0fcdaf 100644 --- a/Bingoo/include/base/msp_MK32_1.h +++ b/Bingoo/include/base/msp_MK32_1.h @@ -7,7 +7,7 @@ #ifndef INC_MSP_MSP_MK32_1_H_ #define INC_MSP_MSP_MK32_1_H_ -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" #include "msp_MK32.pb.h" void Sbus_Data_Count(uint8_t *buf, int32_t *But_Value); extern SP_MSP_MK32_Button *P_MK32; diff --git a/Bingoo/include/base/msp_TL720D.h b/Bingoo/include/base/msp_TL720D.h index 8b380da..8979a88 100644 --- a/Bingoo/include/base/msp_TL720D.h +++ b/Bingoo/include/base/msp_TL720D.h @@ -12,7 +12,7 @@ #include #include "bsp_MB_host.h" #include "stdio.h" -#include "BSP/bsp_UART.h" +#include "bsp_UART.h" #include "usart.h" #include "gpio.h" diff --git a/Bingoo/library/CMakeLists.txt b/Bingoo/library/CMakeLists.txt index 6563e8e..c49b03b 100644 --- a/Bingoo/library/CMakeLists.txt +++ b/Bingoo/library/CMakeLists.txt @@ -252,7 +252,6 @@ endif() target_compile_options(${CURRENT_TARGET_NAME} PRIVATE -Wall - -Werror $<$:-g -O0> $<$:-O2> -ffunction-sections -fdata-sections diff --git a/Bingoo/main/CMakeLists.txt b/Bingoo/main/CMakeLists.txt index d031efd..7127d47 100644 --- a/Bingoo/main/CMakeLists.txt +++ b/Bingoo/main/CMakeLists.txt @@ -48,7 +48,6 @@ endif() target_compile_options(${TARGET_NAME} PRIVATE -Wall - -Werror $<$:-g -O0> $<$:-O2> ) \ No newline at end of file diff --git a/Core/Src/main.c b/Core/Src/main.c index e86d98e..2479996 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -37,6 +37,7 @@ #include "msp_ground_management.h" #include "msp_strain_gauge.h" #include +#include "msp_TTMotor_ZQ.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/