fix-module/shoot-heatControl,,,热量参数待设config.c-129-134
This commit is contained in:
parent
66cc032a45
commit
8ab6208ff1
@ -127,6 +127,7 @@ Config_RobotParam_t robot_config = {
|
|||||||
},
|
},
|
||||||
.heatControl={
|
.heatControl={
|
||||||
.enable=true,
|
.enable=true,
|
||||||
|
.safe_shots=5, // 安全出弹余量
|
||||||
.nmax=18.0f, // 最大射频 Hz
|
.nmax=18.0f, // 最大射频 Hz
|
||||||
.Hwarn=200.0f, // 热量预警值
|
.Hwarn=200.0f, // 热量预警值
|
||||||
.Hsatu=100.0f, // 热量饱和值
|
.Hsatu=100.0f, // 热量饱和值
|
||||||
|
|||||||
@ -512,6 +512,11 @@ int8_t Shoot_CaluTargetAngle(Shoot_t *s, Shoot_CMD_t *cmd)
|
|||||||
/* 根据热量控制计算实际射频 */
|
/* 根据热量控制计算实际射频 */
|
||||||
float actual_freq = Shoot_CaluFreqByHeat(s);
|
float actual_freq = Shoot_CaluFreqByHeat(s);
|
||||||
|
|
||||||
|
/* 检查可发射弹丸数是否满足安全余量 */
|
||||||
|
if (s->param->heatControl.enable && s->heatcontrol.shots_available <= s->param->heatControl.safe_shots) {
|
||||||
|
actual_freq = 0.0f; /* 禁止发弹 */
|
||||||
|
}
|
||||||
|
|
||||||
float dt = s->timer.now - s->var_trig.time_lastShoot;
|
float dt = s->timer.now - s->var_trig.time_lastShoot;
|
||||||
float dpos;
|
float dpos;
|
||||||
dpos = CircleError(s->target_variable.trig_angle, s->var_trig.trig_agl, M_2PI);
|
dpos = CircleError(s->target_variable.trig_angle, s->var_trig.trig_agl, M_2PI);
|
||||||
|
|||||||
@ -164,6 +164,7 @@ typedef struct {
|
|||||||
}jamDetection;/* 卡弹检测参数 */
|
}jamDetection;/* 卡弹检测参数 */
|
||||||
struct {
|
struct {
|
||||||
bool enable; /* 是否启用热量控制 */
|
bool enable; /* 是否启用热量控制 */
|
||||||
|
uint16_t safe_shots;/* 安全余量,当shots_available小于等于该值时禁止发弹 */
|
||||||
float nmax;//最大射频
|
float nmax;//最大射频
|
||||||
float Hwarn;//热量预警值
|
float Hwarn;//热量预警值
|
||||||
float Hsatu;//热量饱和值
|
float Hsatu;//热量饱和值
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user