chore: 导入 Simba-OmniInfantry 基线(云台/底盘双工程)
- 云台(ROBOT_TYPE_GIMBAL)与底盘(ROBOT_TYPE_CHASSIS)完整固件源码 - 新增根级 .gitignore,排除 Keil MDK-ARM 构建产物(.o/.d/.crf/.axf/.lnp/.map/.htm/.sct/.dep/.iex/.lst 等) 与 *.uvguix.* / DebugConfig/(与机器绑定的 UI 布局) - core.autocrlf=false,避免固件源码在检出时被改动换行符
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/* =============================================================================
|
||||
* referee_task.c - 裁判系统链路监测
|
||||
* 解析在 USART6 空闲中断完成(referee_parse_bytes 流式喂入),
|
||||
* 本任务仅做 100ms 周期的链路超时监测与心跳上报
|
||||
* ========================================================================== */
|
||||
#include "app_tasks.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "bsp_usart.h"
|
||||
#include "referee.h"
|
||||
#include "robot_param.h"
|
||||
|
||||
/* referee_task:裁判系统链路监测
|
||||
* 解析在接收中断完成(referee_parse_bytes),本任务仅做超时监测与心跳 */
|
||||
|
||||
void referee_frame_callback(const uint8_t * frame, uint16_t len)
|
||||
{
|
||||
referee_parse_bytes(frame, len);
|
||||
}
|
||||
|
||||
void referee_task(void const * argument)
|
||||
{
|
||||
while (!app_ready)
|
||||
osDelay(2);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* 链路超时置断线 */
|
||||
if (referee.link_status &&
|
||||
HAL_GetTick() - referee.last_update_tick > DEVICE_OFFLINE_TIME_MS * 10)
|
||||
referee.link_status = 0;
|
||||
|
||||
monitor_heartbeat(HB_REFEREE);
|
||||
osDelay(100);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user