From dc713149918c980f23bc9405b8ffe7502d5f515e Mon Sep 17 00:00:00 2001
From: yincheng.zhong <634916154@qq.com>
Date: 星期六, 29 十一月 2025 18:57:26 +0800
Subject: [PATCH] IM23数据解析成功,但是硬件仿真有问题,在解决。
---
STM32H743/APL/app.c | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/STM32H743/APL/app.c b/STM32H743/APL/app.c
index f261439..ff76a00 100644
--- a/STM32H743/APL/app.c
+++ b/STM32H743/APL/app.c
@@ -13,7 +13,14 @@
#include "UDPClient.h"
#include "bluetooth.h"
#include "TCPClient.h"
-static osSemaphoreId_t g_semaphoreHandle = NULL;
+#include "SBUS.h"
+#include "pwm_ctrol.h"
+#include "PythonLink.h"
+#include "motion_control_task.h"
+#include "motion_calibration_task.h"
+osSemaphoreId_t g_semaphoreHandle = NULL;
+TaskHandle_t g_app_task_handle = NULL;
+
extern uint8_t restart_num;
void IdleTask(void)
{
@@ -39,16 +46,22 @@
UDPClient_Init();
TCPClient_Init();
BT_Init();
+ SBUS_Init();
+ PythonLink_Init();
+ MotionControl_TaskInit();
+ MotionCalibration_TaskInit();
while (1)
{
//HIDO_UINT32 timeout = HIDO_TimerGetNearestTimeout(1000);
- HIDO_UINT32 timeout = 100;
+ HIDO_UINT32 timeout = 5;
if (xSemaphoreTake(g_semaphoreHandle, timeout / portTICK_PERIOD_MS) == pdTRUE)
{
}
DBG_Poll();
BT_Poll();
+ SBUS_Poll();
+ PythonLink_Poll();
HIDO_ATLitePoll();
Internet_Poll();
GPS_Poll();
@@ -103,13 +116,11 @@
uint16_t version = g_com_map[VERSION];
- // printf("[BOOT] Version: %u\r\n", version);
- // printf("[BOOT] DeviceID: %u\r\n", dev_id);
- // printf("[BOOT] UDP Server: %u.%u.%u.%u:%u\r\n", ip0, ip1, ip2, ip3, udp_port);
- // printf("[BOOT] TCP Server: %u.%u.%u.%u:%u\r\n", tip0, tip1, tip2, tip3, tcp_port);
+ HIDO_Debug2("[BOOT] Version: %u\r\n", version);
+ HIDO_Debug2("[BOOT] DeviceID: %u\r\n", dev_id);
+ HIDO_Debug2("[BOOT] UDP Server: %u.%u.%u.%u:%u\r\n", ip0, ip1, ip2, ip3, udp_port);
+ HIDO_Debug2("[BOOT] TCP Server: %u.%u.%u.%u:%u\r\n", tip0, tip1, tip2, tip3, tcp_port);
}
- TaskHandle_t xTaskHandle = NULL;
-
osSemaphoreAttr_t semaphore_attr = {
.name = "MySemaphore",
.attr_bits = 0,
@@ -125,5 +136,5 @@
2048,
NULL,
tskIDLE_PRIORITY + 1,
- &xTaskHandle);
+ &g_app_task_handle);
}
--
Gitblit v1.10.0