22 lines
1008 B
C
22 lines
1008 B
C
#ifndef SHOOT_H
|
|
#define SHOOT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
extern uint8_t shoot_friction_flag;//摩擦轮开启标志(供激光联动与调试)
|
|
|
|
void shoot_init(void);//初始化摩擦轮与拨弹盘速度环PID及激光PWM
|
|
void shoot_control(uint8_t friction_on, uint8_t fire, uint8_t eject, uint8_t shooter_power_on);//发射机构控制(2ms调用)
|
|
void shoot_send_cmd(void);//下发摩擦轮(CAN1 0x200)与拨弹(CAN2 0x200)电流帧
|
|
void shoot_output_zero(void);//发射机构安全停机(电流清零并关闭激光)
|
|
|
|
void shoot_bench_step(void);//拨弹单机台架状态机(2ms调用)
|
|
void shoot_bench_send(void);//拨弹单机台架CAN2 0x200槽1下发
|
|
|
|
extern volatile float bench_rammer_out_cur;//台架拨弹PID输出(counts)
|
|
extern volatile float bench_eject_travel_deg;//台架本次退弹累计转角(°)
|
|
extern volatile uint8_t bench_state_dbg;//台架状态(0=IDLE,1=EJECT,2=LATCH)
|
|
extern volatile uint8_t bench_eject_abort;//台架退弹中止原因(0=无,1=软限,2=超时,3=硬限)
|
|
|
|
#endif
|