代码风格更新以及加入超电的对接

This commit is contained in:
lyf committed 2026-11-25 17:24:46 +08:00
1 parent 957c535bda
commit 9de485e4ef
117 files changed
+9046 -6457

No files matched your search

+16 -15
View File
@@ -1,8 +1,8 @@
/* =============================================================================
* shoot_task.c - 发射机构任务(2ms)
* shoot_control() 计算摩擦轮/拨弹电流 -> shoot_send_cmd() 发 0x200(CAN1 摩擦轮 / CAN2 拨弹);
* 发射机构上电状态来自底盘 0x019
* ========================================================================== */
/*
*文件名称:shoot_task.c
*功能描述:发射机构控制任务(2ms),计算摩擦轮与拨弹电流并发送0x200控制帧
*备注:发射机构上电状态来自底盘0x019(ctoc_shooter_power)
*/
#include "app_tasks.h"
#include "cmsis_os.h"
#include "FreeRTOS.h"
@@ -12,14 +12,19 @@
#include "shoot.h"
#include "c_comm.h"
#include "dr16.h"
#include "robot_param.h" /* 必须包含:GIMBAL_BENCH_RAMMER_TUNE 等开关定义在此 */
/* shoot_task(云台板,2ms):摩擦轮/拨弹控制
* 发射机构上电状态来自底盘 0x019(ctoc_shooter_power) */
#include "robot_param.h"//GIMBAL_BENCH_RAMMER_TUNE等开关定义
/*
*函数简介:发射机构控制任务(2ms)
*参数说明:argument:FreeRTOS任务参数(未使用)
*返回类型:无
*备注:支持台架单机拨弹调试模式与整车门控模式
*/
void shoot_task(void const * argument)
{
TickType_t last_wake = xTaskGetTickCount();
(void)argument;
TickType_t last_wake = xTaskGetTickCount();//绝对延时基准
while (!app_ready)
osDelay(2);
@@ -27,11 +32,7 @@ void shoot_task(void const * argument)
for (;;)
{
#if GIMBAL_BENCH_RAMMER_TUNE
/* ---- 台架调试工况:单机拨弹 ----------------------------------------
* 只有 M2006(拨弹)+DT7 时使用:旁路 cmd_robot.online / gimbal_motor_offline /
* ctoc_chassis_fault 全部门控,直接由 DT7 驱动拨弹盘。
* 控制方式同整车遥控器模式:S1 上=使能、拨轮下=发射、拨轮上=退弹、中位=停;
* 退弹由 shoot_bench_step() 内部做 转角/电流/超时 保护。 */
/* 台架调试工况:仅M2006+DT7单机拨弹,旁路整车门控 */
shoot_bench_step();
shoot_bench_send();
#else