添加nuc控制小陀螺模式开启

This commit is contained in:
RB 2025-03-11 09:23:12 +08:00
parent 33c47a12e4
commit 4cc319e997
15 changed files with 12376 additions and 12311 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -37,9 +37,45 @@ 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 ballistics.c...
compiling ahrs.c...
compiling freertos.c...
compiling capacity.c...
compiling cmd.c...
compiling crc16.c...
compiling filter.c...
compiling mixer.c...
compiling pid.c...
compiling user_math.c...
compiling ui.c...
compiling bmi088.c...
compiling can.c...
compiling dr16.c...
compiling ist8310.c...
compiling ai.c...
compiling referee.c...
compiling cap.c...
compiling config.c...
compiling gimbal.c...
compiling chassis.c...
compiling shoot.c...
compiling ai.c...
compiling atti_esti.c...
compiling cap.c...
compiling can.c...
compiling cli.c...
compiling command.c...
compiling ctrl_chassis.c...
compiling ctrl_gimbal.c...
compiling ctrl_shoot.c...
compiling info.c...
compiling init.c...
compiling monitor.c...
compiling rc.c...
compiling referee.c...
compiling user_task.c...
linking...
Program Size: Code=148800 RO-data=6908 RW-data=760 ZI-data=43832
Program Size: Code=148832 RO-data=6908 RW-data=760 ZI-data=43832
FromELF: creating hex file...
"DevC\DevC.axf" - 0 Error(s), 0 Warning(s).
@ -55,7 +91,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:02
Build Time Elapsed: 00:00:11
</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: Sun Mar 9 16:57:50 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Tue Mar 11 09:18:01 2025
<BR><P>
<H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@ -767,7 +767,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Ai
</UL>
<P><STRONG><a name="[288]"></a>AI_PackCmd</STRONG> (Thumb, 62 bytes, Stack size 8 bytes, ai.o(.text.AI_PackCmd))
<P><STRONG><a name="[288]"></a>AI_PackCmd</STRONG> (Thumb, 72 bytes, Stack size 8 bytes, ai.o(.text.AI_PackCmd))
<BR><BR>[Stack]<UL><LI>Max Depth = 8<LI>Call Chain = AI_PackCmd
</UL>
<BR>[Called By]<UL><LI><a href="#[97]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Ai
@ -1271,7 +1271,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_Command
</UL>
<P><STRONG><a name="[296]"></a>CMD_ParseHost</STRONG> (Thumb, 132 bytes, Stack size 16 bytes, cmd.o(.text.CMD_ParseHost))
<P><STRONG><a name="[296]"></a>CMD_ParseHost</STRONG> (Thumb, 158 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
@ -7313,7 +7313,7 @@ Local Symbols
<BR>[Called By]<UL><LI><a href="#[133]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_ParseRc
</UL>
<P><STRONG><a name="[137]"></a>CMD_RcLogic</STRONG> (Thumb, 320 bytes, Stack size 20 bytes, cmd.o(.text.CMD_RcLogic))
<P><STRONG><a name="[137]"></a>CMD_RcLogic</STRONG> (Thumb, 316 bytes, Stack size 20 bytes, cmd.o(.text.CMD_RcLogic))
<BR><BR>[Stack]<UL><LI>Max Depth = 20<LI>Call Chain = CMD_RcLogic
</UL>
<BR>[Called By]<UL><LI><a href="#[133]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_ParseRc

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.

View File

@ -15,6 +15,7 @@ extern "C"
#define AI_NOTICE_HITBUFF (1 << 1)
#define AI_NOTICE_AUTOMATIC (1 << 2)
#define AI_NOTICE_FIRE (1 << 3)
#define AI_NOTICE_ROTOR (1 << 7)
#define AI_ID_MCU (0xC4)
#define AI_ID_REF (0xA8)

View File

@ -241,7 +241,7 @@ static void CMD_RcLogic(const CMD_RC_t *rc, CMD_t *cmd, float dt_sec)
break;
case CMD_SW_DOWN:
cmd->chassis.mode = CHASSIS_MODE_ROTOR;
// cmd->chassis.mode = CHASSIS_MODE_ROTOR;
cmd->chassis.mode_rotor = ROTOR_MODE_CW;
cmd->ai_status = AI_STATUS_NAVIGATION;
cmd->host_overwrite = true;
@ -400,6 +400,13 @@ int8_t CMD_ParseHost(const CMD_Host_t *host, CMD_t *cmd, float dt_sec)
cmd->chassis.ctrl_vec.vx = host->chassis_move_vec.vx;
cmd->chassis.ctrl_vec.vy = host->chassis_move_vec.vy;
cmd->chassis.ctrl_vec.wz = host->chassis_move_vec.wz;
/*底盘运动模式*/
if (host->rotor){
cmd->chassis.mode = CHASSIS_MODE_ROTOR;
} else {
cmd->chassis.mode = CHASSIS_MODE_FOLLOW_GIMBAL;
}
/* host射击命令设置不同的射击频率和弹丸初速度 */
if (host->fire)
{

View File

@ -254,6 +254,7 @@ typedef struct {
} chassis_move_vec; /* 底盘移动向量 */
bool fire; /* 开火状态 */
bool rotor; /* 小陀螺状态 */
} CMD_Host_t;
/**

View File

@ -91,7 +91,7 @@ void AI_PackCmd(AI_t *ai, CMD_Host_t *cmd_host) {
cmd_host->gimbal_delta.yaw = ai->form_host.data.gimbal.yaw;
cmd_host->gimbal_delta.pit = ai->form_host.data.gimbal.pit;
cmd_host->fire = (ai->form_host.data.notice & AI_NOTICE_FIRE);
// cmd_host->fire = true;
cmd_host->rotor = (ai->form_host.data.notice & AI_NOTICE_ROTOR);
cmd_host->chassis_move_vec.vx = ai->form_host.data.chassis_move_vec.vx;
cmd_host->chassis_move_vec.vy = ai->form_host.data.chassis_move_vec.vy;
cmd_host->chassis_move_vec.wz = ai->form_host.data.chassis_move_vec.wz;