|
@@ -150,7 +150,7 @@ DMA_HandleTypeDef hdma_usart1_tx;
|
|
|
DMA_HandleTypeDef hdma_usart2_rx;
|
|
|
DMA_HandleTypeDef hdma_usart3_rx;
|
|
|
|
|
|
-uint8_t bufMain[128];
|
|
|
+char bufMain[128];
|
|
|
|
|
|
/* Definitions for defaultTask */
|
|
|
osThreadId_t defaultTaskHandle;
|
|
@@ -523,11 +523,11 @@ void Cang_Init(void);
|
|
|
static void MX_NVIC_Init(void);
|
|
|
|
|
|
// for debug,将信息输出到指定的uart总线上
|
|
|
-static void DumpMsg(uint8_t *msg)
|
|
|
+static void DumpMsg(char *msg)
|
|
|
{
|
|
|
HAL_GPIO_WritePin(GPIOA,con03_uart2_kongzhiqi_Pin,GPIO_PIN_RESET);
|
|
|
delay_sys_us(80);
|
|
|
- HAL_UART_Transmit_IT(&huart2,msg,strlen(msg));
|
|
|
+ HAL_UART_Transmit_IT(&huart2,(uint8_t *)msg,strlen(msg));
|
|
|
while (huart2.gState == HAL_UART_STATE_BUSY_TX)
|
|
|
{
|
|
|
osDelay(1);
|
|
@@ -941,7 +941,7 @@ int main(void)
|
|
|
memset(bufMain,0,128);
|
|
|
spr000=sprintf((char*)bufMain,"sysytem reset...%5d, watchDogOn=%d, version:%d-%d",5,WatchDogOn,Version_Soft[7],Version_Soft[3]);
|
|
|
//HAL_UART_Transmit(&huart1,bufMain,32,300);
|
|
|
- HAL_UART_Transmit(&huart2,bufMain,spr000,300);
|
|
|
+ HAL_UART_Transmit(&huart2,(uint8_t *)bufMain,spr000,300);
|
|
|
//HAL_UART_Transmit(&huart3,bufMain,32,300);
|
|
|
|
|
|
|
|
@@ -2136,8 +2136,17 @@ void StartTask03(void *argument) //
|
|
|
/* USER CODE BEGIN StartTask02 */
|
|
|
static uint8_t i001=0,i002 = 0,i003 = 0,receive_error = 0;
|
|
|
uint16_t rkgaddr_max = 0,temaddr_max = 0,leveladdr_max = 0,RKG_angle = 0;
|
|
|
- static uint16_t i = 0,rkdg_cnt = 0,rkxg_cnt = 0,level_cnt = 0,tem_cnt = 0,temp_dot_cnt=0,temp_dot_dex=0,ModbusCRC = 0,ModbusCRC1 = 0;
|
|
|
- uint16_t rx_len,head = 0;
|
|
|
+ static uint16_t i = 0;
|
|
|
+ //static uint16_t rkdg_cnt = 0;
|
|
|
+ static uint16_t rkxg_cnt = 0;
|
|
|
+ //static uint16_t level_cnt = 0;
|
|
|
+ //static uint16_t tem_cnt = 0;
|
|
|
+ //static uint16_t temp_dot_cnt=0;
|
|
|
+ //static uint16_t temp_dot_dex=0;
|
|
|
+ static uint16_t ModbusCRC = 0;
|
|
|
+ //static uint16_t ModbusCRC1 = 0;
|
|
|
+ //static uint16_t
|
|
|
+ static uint16_t rx_len,head = 0;
|
|
|
S_ANGLEDATA* psATsk3 = gs_AngleData;
|
|
|
KZQ_Inf* pkzq = &kzq_inf;
|
|
|
RKG_Inf* prkg = rkg_inf;
|
|
@@ -2876,7 +2885,7 @@ void StartTask04(void *argument) //
|
|
|
uint8_t* send_ptr;
|
|
|
uint16_t send_len;
|
|
|
uint32_t tmpU32;
|
|
|
-
|
|
|
+ UNUSED(ModbusCRC1);
|
|
|
KZQ_Inf* pkzq = &kzq_inf;
|
|
|
|
|
|
extern uint8_t USART2_RX_BUF002[Uart2_BUF_SIZE];
|