待拟合

This commit is contained in:
ws 2025-07-06 23:10:05 +08:00
parent 13bb73b72f
commit 7ce1231e9a
6 changed files with 35 additions and 16 deletions

View File

@ -102,3 +102,7 @@
[info] Log at : 2025/7/4|09:10:46|GMT+0800 [info] Log at : 2025/7/4|09:10:46|GMT+0800
[info] Log at : 2025/7/6|22:01:26|GMT+0800
[info] Log at : 2025/7/6|22:02:13|GMT+0800

View File

@ -1,13 +1,18 @@
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin'
Build target 'R1' Build target 'R1'
compiling shootTask.cpp... compiling userTask.c...
compiling nuc.c... compiling remote_control.c...
compiling initTask.c... compiling initTask.c...
compiling ball.cpp... compiling main.c...
compiling djiMotor.c...
compiling nucTask.cpp... compiling nucTask.cpp...
compiling shoot.cpp... compiling shoot.cpp...
compiling encodeCan.cpp...
compiling ball.cpp...
compiling shootTask.cpp...
compiling ballTask.cpp...
linking... linking...
Program Size: Code=32960 RO-data=1832 RW-data=268 ZI-data=32220 Program Size: Code=31240 RO-data=1832 RW-data=268 ZI-data=32220
FromELF: creating hex file... FromELF: creating hex file...
"R1\R1.axf" - 0 Error(s), 0 Warning(s). "R1\R1.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:02:09 Build Time Elapsed: 00:00:09

View File

@ -1 +1 @@
2025/7/4 9:21:52 2025/7/6 22:22:20

View File

@ -173,22 +173,32 @@
<Ww> <Ww>
<count>3</count> <count>3</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>nucbuf</ItemText> <ItemText>ball_exit,0x0A</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>4</count> <count>4</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>cmd_fromnuc</ItemText> <ItemText>nucbuf</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>5</count> <count>5</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>drop_message,0x0A</ItemText> <ItemText>nuc_v</ItemText>
</Ww> </Ww>
<Ww> <Ww>
<count>6</count> <count>6</count>
<WinNumber>1</WinNumber> <WinNumber>1</WinNumber>
<ItemText>error_code,0x0A</ItemText> <ItemText>test_exit,0x0A</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>ttttt1,0x0A</ItemText>
</Ww>
<Ww>
<count>8</count>
<WinNumber>1</WinNumber>
<ItemText>ball_exit,0x0A</ItemText>
</Ww> </Ww>
</WatchWindow1> </WatchWindow1>
<MemoryWindow4> <MemoryWindow4>

View File

@ -11,13 +11,11 @@ extern int ball_exit;
// 伸缩 // 伸缩
//外死点168 外163 中150 内127 限位124.8 //外死点168 外163 中150 内127 限位124.8
#define I_ANGLE 127 #define I_ANGLE 124.8
#define O_ANGLE 163 #define O_ANGLE 168
#define WAIT_POS 150 #define WAIT_POS 150
#define IN 124.8
#define OUT 168
// PE11 气缸 // PE11 气缸git stash apply
Ball ::Ball() Ball ::Ball()
{ {

View File

@ -84,7 +84,7 @@ void Shoot::trigger_control()
float shoot_fitting(float x) float shoot_fitting(float x)
{ {
return 0.2006334f * x * x + 25.788123f * x + -169.32157 + 3.8f; return 0.2006334f * x * x + 25.788123f * x + -169.32157 + 3.8f-3.8f;
} }
float pass_fitting(float x) float pass_fitting(float x)
@ -405,6 +405,8 @@ void Shoot::shoot_control()
{ {
case VSION: case VSION:
fire_pos = shoot_fitting(distance); // 视觉拟合的力 fire_pos = shoot_fitting(distance); // 视觉拟合的力
//fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置
switch (rc_key) switch (rc_key)
{ {
case MIDDLE1: case MIDDLE1: