15 Commits

Author SHA1 Message Date
RB
d79bb5ea0b 改完了 2025-03-19 17:19:43 +08:00
RB
3a509aaf87 修改扫描范围 2025-03-17 13:09:57 +08:00
RB
aa5e191f30 修改射频10 2025-03-16 23:40:02 +08:00
RB
1b0ed78b10 修改弹速 2025-03-16 23:02:55 +08:00
RB
fe7d4bd705 调了个硬的 2025-03-16 10:37:46 +08:00
RB
0ff235f235 准备调pid 2025-03-16 09:56:29 +08:00
RB
1f897bd9ae 调好pid了 2025-03-15 01:03:52 +08:00
RB
6b05b4d58a 修改扫描范围 2025-03-14 22:47:40 +08:00
RB
a749be5f93 修改扫描速度 2025-03-14 22:10:04 +08:00
RB
3404c951b8 无论如何保持上膛模式防止掉速 2025-03-10 22:16:15 +08:00
RB
d744da4cde 修复拨弹电机控制冲突的问题 2025-03-10 22:04:45 +08:00
RB
222c1a6ca2 修改form->from 2025-03-10 21:37:58 +08:00
RB
2f0f1beb1e 添加了扫描,略微调参数,(未清空host,原因不明) 2025-03-10 16:05:14 +08:00
RB
774fd7e3fe 添加yaw周软件限位 2025-03-10 10:30:30 +08:00
RB
ac5a01df30 sentry_right 2025-03-09 18:01:50 +08:00
77 changed files with 14171 additions and 14061 deletions

File diff suppressed because one or more lines are too long

View File

@@ -417,7 +417,20 @@
<WinNumber>1</WinNumber>
<ItemText>host</ItemText>
</Ww>
<Ww>
<count>12</count>
<WinNumber>1</WinNumber>
<ItemText>gimbal_ai</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow4>
<Mm>
<WinNumber>4</WinNumber>
<SubType>0</SubType>
<ItemText>for_chassis</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow4>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>

Binary file not shown.

View File

@@ -22,7 +22,7 @@ Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2>
C:\Users\lvzucheng\Documents\RMUL2025\MDK-ARM\DevC.uvprojx
Project File Date: 03/14/2025
Project File Date: 03/19/2025
<h2>Output:</h2>
*** Using Compiler 'V6.16', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
@@ -37,9 +37,13 @@ Note: source file '..\User\task\ai.c' - object file renamed from 'DevC\ai.o' to
Note: source file '..\User\task\can.c' - object file renamed from 'DevC\can.o' to 'DevC\can_3.o'.
Note: source file '..\User\task\cap.c' - object file renamed from 'DevC\cap.o' to 'DevC\cap_1.o'.
Note: source file '..\User\task\referee.c' - object file renamed from 'DevC\referee.o' to 'DevC\referee_1.o'.
compiling user_math.c...
compiling main.c...
compiling ai.c...
compiling config.c...
compiling shoot.c...
linking...
Program Size: Code=149520 RO-data=7272 RW-data=760 ZI-data=43832
Program Size: Code=149600 RO-data=6928 RW-data=1104 ZI-data=43832
FromELF: creating hex file...
"DevC\DevC.axf" - 0 Error(s), 0 Warning(s).
@@ -55,7 +59,7 @@ Package Vendor: Keil
C:\Users\lvzucheng\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.15.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include
<h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:01
Build Time Elapsed: 00:00:03
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
<title>Static Call Graph - [DevC\DevC.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image DevC\DevC.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Sat Mar 15 00:25:56 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Wed Mar 19 17:14:45 2025
<BR><P>
<H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@@ -724,9 +724,9 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[347]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ieee754_rem_pio2
</UL>
<P><STRONG><a name="[362]"></a>__decompress</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, __dczerorl2.o(.text), UNUSED)
<P><STRONG><a name="[362]"></a>__decompress</STRONG> (Thumb, 0 bytes, Stack size unknown bytes, __dclz77c.o(.text), UNUSED)
<P><STRONG><a name="[363]"></a>__decompress1</STRONG> (Thumb, 86 bytes, Stack size unknown bytes, __dczerorl2.o(.text), UNUSED)
<P><STRONG><a name="[363]"></a>__decompress2</STRONG> (Thumb, 94 bytes, Stack size unknown bytes, __dclz77c.o(.text), UNUSED)
<P><STRONG><a name="[c3]"></a>AHRS_GetEulr</STRONG> (Thumb, 348 bytes, Stack size 48 bytes, ahrs.o(.text.AHRS_GetEulr))
<BR><BR>[Stack]<UL><LI>Max Depth = 80<LI>Call Chain = AHRS_GetEulr &rArr; __hardfp_atan2f
@@ -751,8 +751,8 @@ Global Symbols
<P><STRONG><a name="[188]"></a>AHRS_ResetEulr</STRONG> (Thumb, 18 bytes, Stack size 4 bytes, ahrs.o(.text.AHRS_ResetEulr))
<BR><BR>[Stack]<UL><LI>Max Depth = 4<LI>Call Chain = AHRS_ResetEulr
</UL>
<BR>[Called By]<UL><LI><a href="#[184]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_SetMode
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<BR>[Called By]<UL><LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[184]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_SetMode
</UL>
<P><STRONG><a name="[ca]"></a>AHRS_Update</STRONG> (Thumb, 3098 bytes, Stack size 224 bytes, ahrs.o(.text.AHRS_Update))
@@ -1295,7 +1295,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command
</UL>
<P><STRONG><a name="[29a]"></a>CMD_ParseHost</STRONG> (Thumb, 100 bytes, Stack size 16 bytes, cmd.o(.text.CMD_ParseHost))
<P><STRONG><a name="[29a]"></a>CMD_ParseHost</STRONG> (Thumb, 120 bytes, Stack size 16 bytes, cmd.o(.text.CMD_ParseHost))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = CMD_ParseHost
</UL>
<BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command
@@ -1353,7 +1353,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[268]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Referee_Parse
</UL>
<P><STRONG><a name="[280]"></a>CalculateRpm</STRONG> (Thumb, 284 bytes, Stack size 20 bytes, user_math.o(.text.CalculateRpm))
<P><STRONG><a name="[280]"></a>CalculateRpm</STRONG> (Thumb, 320 bytes, Stack size 20 bytes, user_math.o(.text.CalculateRpm))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = CalculateRpm
</UL>
<BR>[Called By]<UL><LI><a href="#[27c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_Control
@@ -1443,20 +1443,20 @@ Global Symbols
<P><STRONG><a name="[185]"></a>CircleAdd</STRONG> (Thumb, 132 bytes, Stack size 16 bytes, user_math.o(.text.CircleAdd))
<BR><BR>[Stack]<UL><LI>Max Depth = 16<LI>Call Chain = CircleAdd
</UL>
<BR>[Called By]<UL><LI><a href="#[283]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_UpdateFeedback
<BR>[Called By]<UL><LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[283]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_UpdateFeedback
<LI><a href="#[27c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_Control
<LI><a href="#[27d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_SetMode
<LI><a href="#[189]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Init
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
</UL>
<P><STRONG><a name="[186]"></a>CircleError</STRONG> (Thumb, 154 bytes, Stack size 20 bytes, user_math.o(.text.CircleError))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = CircleError
</UL>
<BR>[Called By]<UL><LI><a href="#[148]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;PID_Calc
<BR>[Called By]<UL><LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[148]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;PID_Calc
<LI><a href="#[283]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_UpdateFeedback
<LI><a href="#[27d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_SetMode
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
</UL>
<P><STRONG><a name="[14c]"></a>CircleReverse</STRONG> (Thumb, 32 bytes, Stack size 4 bytes, user_math.o(.text.CircleReverse))
@@ -1752,7 +1752,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_CLI
</UL>
<P><STRONG><a name="[183]"></a>Gimbal_Control</STRONG> (Thumb, 852 bytes, Stack size 64 bytes, gimbal.o(.text.Gimbal_Control))
<P><STRONG><a name="[183]"></a>Gimbal_Control</STRONG> (Thumb, 856 bytes, Stack size 64 bytes, gimbal.o(.text.Gimbal_Control))
<BR><BR>[Stack]<UL><LI>Max Depth = 184<LI>Call Chain = Gimbal_Control &rArr; Gimbal_SetMode &rArr; PID_Reset &rArr; LowPassFilter2p_Reset &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf
</UL>
<BR>[Calls]<UL><LI><a href="#[184]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_SetMode
@@ -3118,11 +3118,11 @@ Global Symbols
<LI><a href="#[23a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__ARM_isinf
<LI><a href="#[c8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
</UL>
<BR>[Called By]<UL><LI><a href="#[145]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Chassis_Control
<BR>[Called By]<UL><LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[145]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Chassis_Control
<LI><a href="#[148]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;PID_Calc
<LI><a href="#[156]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;LowPassFilter2p_Reset
<LI><a href="#[27c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_Control
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
</UL>
<P><STRONG><a name="[14e]"></a>LowPassFilter2p_Init</STRONG> (Thumb, 316 bytes, Stack size 40 bytes, filter.o(.text.LowPassFilter2p_Init))
@@ -3448,10 +3448,10 @@ Global Symbols
<LI><a href="#[14a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;LowPassFilter2p_Apply
<LI><a href="#[c8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_f2d
</UL>
<BR>[Called By]<UL><LI><a href="#[145]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Chassis_Control
<BR>[Called By]<UL><LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[145]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Chassis_Control
<LI><a href="#[8d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_AttiEsti
<LI><a href="#[27c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Shoot_Control
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
</UL>
<P><STRONG><a name="[14d]"></a>PID_Init</STRONG> (Thumb, 406 bytes, Stack size 32 bytes, pid.o(.text.PID_Init))
@@ -3972,12 +3972,12 @@ Global Symbols
<LI><a href="#[f7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;osKernelGetTickFreq
<LI><a href="#[289]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;osKernelGetTickCount
<LI><a href="#[28e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;osDelayUntil
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
<LI><a href="#[18a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_UpdateFeedback
<LI><a href="#[29e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_PackAI
<LI><a href="#[189]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Init
<LI><a href="#[2a0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_DumpUI
<LI><a href="#[29f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_DumpOutput
<LI><a href="#[183]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_Control
</UL>
<BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init)
</UL>
@@ -7581,7 +7581,7 @@ Local Symbols
<BR>[Called By]<UL><LI><a href="#[145]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Chassis_Control
</UL>
<P><STRONG><a name="[184]"></a>Gimbal_SetMode</STRONG> (Thumb, 252 bytes, Stack size 24 bytes, gimbal.o(.text.Gimbal_SetMode))
<P><STRONG><a name="[184]"></a>Gimbal_SetMode</STRONG> (Thumb, 256 bytes, Stack size 24 bytes, gimbal.o(.text.Gimbal_SetMode))
<BR><BR>[Stack]<UL><LI>Max Depth = 120<LI>Call Chain = Gimbal_SetMode &rArr; PID_Reset &rArr; LowPassFilter2p_Reset &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf
</UL>
<BR>[Calls]<UL><LI><a href="#[155]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;PID_Reset

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -288,7 +288,7 @@ static void CMD_RcLogic(const CMD_RC_t *rc, CMD_t *cmd, float dt_sec)
cmd->chassis.ctrl_vec.vx = rc->ch_l_x;
cmd->chassis.ctrl_vec.vy = rc->ch_l_y;
cmd->gimbal.delta_eulr.yaw = rc->ch_r_x * dt_sec * cmd->param->sens_rc;
cmd->gimbal.delta_eulr.pit = -rc->ch_r_y * dt_sec * cmd->param->sens_rc;
cmd->gimbal.delta_eulr.pit = rc->ch_r_y * dt_sec * cmd->param->sens_rc;
}
}
@@ -399,14 +399,20 @@ int8_t CMD_ParseHost(const CMD_Host_t *host, CMD_t *cmd, float dt_sec)
/* 云台欧拉角设置为host相应的变化的欧拉角 */
cmd->gimbal.delta_eulr.yaw = host->gimbal_delta.yaw;
cmd->gimbal.delta_eulr.pit = host->gimbal_delta.pit;
// cmd->shoot.mode = SHOOT_MODE_LOADED;
/* host射击命令设置不同的射击频率和弹丸初速度 */
if (cmd->fire && host->fire)
{
cmd->shoot.fire = true;
if(cmd->fire){
if (host->fire)
{
cmd->shoot.mode = SHOOT_MODE_LOADED;
cmd->shoot.fire = true;
}
else
{
// cmd->shoot.mode = SHOOT_MODE_SAFE;
cmd->shoot.mode = SHOOT_MODE_LOADED;
}
}
return 0;
}

View File

@@ -198,8 +198,8 @@ typedef struct {
typedef struct {
bool pc_ctrl; /* 是否使用键鼠控制 */
bool fire; /* 是否允许发弹 */
bool host_overwrite; /* 是否Host控制 */
bool fire; /* 是否允许发弹 */
uint16_t key_last; /* 上次按键键值 */
struct {
@@ -255,7 +255,6 @@ typedef struct {
bool fire; /* 开火状态 */
// bool search_armor; /* 寻找装甲板模式 */
} CMD_Host_t;
/**

View File

@@ -107,6 +107,7 @@ inline float CalculateRpm(float bullet_speed, float fric_radius, bool is17mm) {
if (is17mm) {
if (bullet_speed == 15.0f) return 4670.f;
if (bullet_speed == 18.0f) return 5200.f;
if (bullet_speed == 25.0f) return 6600.f;
if (bullet_speed == 30.0f) return 7350.f;
} else {
if (bullet_speed == 10.0f) return 4450.f;

View File

@@ -1,5 +1,5 @@
/*
AI
AI
*/
/* Includes ----------------------------------------------------------------- */
@@ -52,7 +52,7 @@ int8_t AI_Init(AI_t *ai) {
Ai_IdleLineCallback);
ai->search_velocity.yaw = 0.0025f;
ai->search_velocity.pit = 0.0015f;
ai->search_velocity.pit = 0.003f;
inited = true;
return 0;
}
@@ -99,15 +99,15 @@ void AI_PackCmd(AI_t *ai, CMD_Host_t *cmd_host) {
}
void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai){
if (gimbal_ai->pit > 1.95){
if (gimbal_ai->pit > 2.45){
ai->search_velocity.pit = fAbs(ai->search_velocity.pit);
} else if (gimbal_ai->pit < 1.75) {
} else if (gimbal_ai->pit < 2.2) {
ai->search_velocity.pit = -fAbs(ai->search_velocity.pit);
}
if (gimbal_ai->yaw > 4.6 && gimbal_ai->yaw < 4.9) {
if (gimbal_ai->yaw > 1.5 && gimbal_ai->yaw < 1.9) {
ai->search_velocity.yaw = -fAbs(ai->search_velocity.yaw);
} else if (gimbal_ai->yaw > 2.4 && gimbal_ai->yaw < 2.7) {
} else if (gimbal_ai->yaw > 5.4 && gimbal_ai->yaw < 6.0) {
ai->search_velocity.yaw = fAbs(ai->search_velocity.yaw);
}
@@ -170,4 +170,3 @@ int8_t AI_StartSend(AI_t *ai, bool ref_update) {
return DEVICE_ERR;
}
}

View File

@@ -71,6 +71,3 @@ void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai);
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -37,8 +37,8 @@ static int8_t Gimbal_SetMode(Gimbal_t *g, CMD_GimbalMode_t mode) {
if (g->mode == GIMBAL_MODE_RELAX) {
if (mode == GIMBAL_MODE_ABSOLUTE) {
// g->setpoint.eulr.yaw = g->feedback.eulr.encoder.yaw;
g->setpoint.eulr.yaw = 0.52f;
g->setpoint.eulr.pit = 2.0f;
g->setpoint.eulr.yaw = 3.7f;
g->setpoint.eulr.pit = 2.2f;
} else if (mode == GIMBAL_MODE_RELATIVE) {
g->setpoint.eulr.yaw = g->feedback.eulr.encoder.yaw;
}
@@ -153,12 +153,12 @@ int8_t Gimbal_Control(Gimbal_t *g, CMD_GimbalCmd_t *g_cmd, uint32_t now) {
g->setpoint.eulr.pit += g_cmd->delta_eulr.pit;
/* 限制yaw转动范围待优化 */
if (g->setpoint.eulr.yaw > 4.5f && g->setpoint.eulr.yaw < 4.7f) {
g->setpoint.eulr.yaw = 4.7f;
} else if (g->setpoint.eulr.yaw > 2.6f && g->setpoint.eulr.yaw < 2.7f) {
g->setpoint.eulr.yaw = 2.6f;
}
if (g->setpoint.eulr.yaw > 5.9f && g->setpoint.eulr.yaw < 6.01f) {
g->setpoint.eulr.yaw = 5.9f;
} else if (g->setpoint.eulr.yaw > 1.4f && g->setpoint.eulr.yaw < 1.71f) {
g->setpoint.eulr.yaw = 1.71f;
}
/* 重置输入指令,防止重复处理 */
AHRS_ResetEulr(&(g_cmd->delta_eulr));

View File

@@ -15,7 +15,7 @@
#define HEAT_INCREASE_17MM (10.f) /* 每发射一颗17mm弹丸增加10热量 */
#define BULLET_SPEED_LIMIT_42MM (16.0)
#define BULLET_SPEED_LIMIT_17MM (30.0)
#define BULLET_SPEED_LIMIT_17MM (25.0)
/* Private macro ------------------------------------------------------------ */
/* Private variables -------------------------------------------------------- */