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,50 @@
|
||||
/* =============================================================================
|
||||
* app_tasks.h - Application 层任务公共声明
|
||||
* 包含:任务心跳编号与 monitor_heartbeat()、freertos.c 弱函数的强定义、
|
||||
* 新建任务函数声明、串口整帧回调声明(dr16/referee)
|
||||
* ========================================================================== */
|
||||
#ifndef APP_TASKS_H
|
||||
#define APP_TASKS_H
|
||||
|
||||
/* Application 层任务公共声明(覆盖 freertos.c 中的弱定义 + 新建任务) */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* 任务心跳编号(monitor_task 检查各任务存活) */
|
||||
typedef enum
|
||||
{
|
||||
HB_IMU = 0,
|
||||
HB_CMD,
|
||||
HB_GIMBAL,
|
||||
HB_SHOOT,
|
||||
HB_CHASSIS,
|
||||
HB_CCOMM,
|
||||
HB_REFEREE,
|
||||
HB_COUNT,
|
||||
} heartbeat_id_e;
|
||||
|
||||
extern volatile uint8_t app_ready; // CAN_Task 完成硬件初始化后置 1
|
||||
|
||||
/* 各任务在循环内调用,向监控任务报活 */
|
||||
extern void monitor_heartbeat(heartbeat_id_e id);
|
||||
|
||||
/* 串口整帧回调(usart 空闲中断递交,CAN_Task 初始化时注册):
|
||||
* 云台板生效,底盘板为空实现 */
|
||||
extern void dr16_frame_callback(const uint8_t * frame, uint16_t len);
|
||||
extern void referee_frame_callback(const uint8_t * frame, uint16_t len);
|
||||
|
||||
/* ---- freertos.c 弱函数的强定义 ---- */
|
||||
extern void CAN_Task(void const * argument);
|
||||
extern void LED_Task(void const * argument);
|
||||
extern void IMU_Task(void const * argument); // 仅云台板
|
||||
|
||||
/* ---- 新建任务 ---- */
|
||||
extern void robot_cmd_task(void const * argument);
|
||||
extern void gimbal_task(void const * argument); // 仅云台板
|
||||
extern void shoot_task(void const * argument); // 仅云台板
|
||||
extern void chassis_task(void const * argument); // 仅底盘板
|
||||
extern void c_comm_task(void const * argument);
|
||||
extern void referee_task(void const * argument);
|
||||
extern void debug_task(void const * argument); // USB 串口诊断输出
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,8 @@
|
||||
/* debug_task.h - USB 虚拟串口诊断任务声明(仅诊断用) */
|
||||
#ifndef DEBUG_TASK_H
|
||||
#define DEBUG_TASK_H
|
||||
|
||||
/* debug_task:USB 虚拟串口(CDC)诊断输出(仅诊断用,稳定后可整组移除) */
|
||||
extern void debug_task(void const * argument);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef REFEREE_TASK_H
|
||||
#define REFEREE_TASK_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* usart6 整帧回调(CAN_Task 注册;can_task.c 引用) */
|
||||
extern void referee_frame_callback(const uint8_t * frame, uint16_t len);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,27 @@
|
||||
/* robot_cmd_task.h - 图传键鼠数据结构 keyboard_data_t(0x0304 解析结果) */
|
||||
#ifndef ROBOT_CMD_TASK_H
|
||||
#define ROBOT_CMD_TASK_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "robot_typedef.h"
|
||||
|
||||
/* 图传键鼠数据(0x0304 解析) */
|
||||
typedef struct
|
||||
{
|
||||
int16_t mouse_rl;
|
||||
int16_t mouse_du;
|
||||
int16_t mouse_wheel;
|
||||
uint8_t mouse_key_l;
|
||||
uint8_t mouse_key_r;
|
||||
uint8_t key_w, key_s, key_a, key_d;
|
||||
uint8_t key_shift, key_ctrl, key_q, key_e;
|
||||
uint8_t key_alpha1, key_alpha2;
|
||||
/* 边沿检测 */
|
||||
uint8_t key_last_q, key_last_e, key_last_shift, key_last_ctrl;
|
||||
uint8_t key_push_q, key_push_e, key_push_shift, key_push_ctrl;
|
||||
uint32_t last_tick;
|
||||
} keyboard_data_t;
|
||||
|
||||
extern keyboard_data_t keyboard_data;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user