靠我又跳尺了

This commit is contained in:
ws 2025-07-10 23:57:54 +08:00
parent d515fad93b
commit 100b21b730
7 changed files with 95 additions and 33 deletions

View File

@ -122,3 +122,19 @@
[info] Log at : 2025/7/8|20:39:07|GMT+0800
[info] Log at : 2025/7/9|08:39:28|GMT+0800
[info] Log at : 2025/7/9|11:36:02|GMT+0800
[info] Log at : 2025/7/9|16:01:34|GMT+0800
[info] Log at : 2025/7/9|23:48:02|GMT+0800
[info] Log at : 2025/7/10|01:59:23|GMT+0800
[info] Log at : 2025/7/10|15:33:45|GMT+0800
[info] Log at : 2025/7/10|17:26:59|GMT+0800
[info] Log at : 2025/7/10|22:12:10|GMT+0800

View File

@ -1,8 +1,39 @@
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin'
Build target 'R1'
compiling shoot.cpp...
linking...
Program Size: Code=32032 RO-data=1832 RW-data=284 ZI-data=32252
FromELF: creating hex file...
"R1\R1.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:05
R1\R1.axf: Error: L6200E: Symbol __asm___6_main_c_main____REV16 multiply defined (by main.o and main.o).
R1\R1.axf: Error: L6200E: Symbol __asm___6_main_c_main____REVSH multiply defined (by main.o and main.o).
R1\R1.axf: Error: L6200E: Symbol __asm___6_main_c_main____RRX multiply defined (by main.o and main.o).
R1\R1.axf: Error: L6200E: Symbol __asm___9_shoot_cpp_24247dc0___Z7__REVSHs multiply defined (by shoot.o and shoot.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_djiMotor_c_0818c4ba____REV16 multiply defined (by djimotor.o and djimotor.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_djiMotor_c_0818c4ba____REVSH multiply defined (by djimotor.o and djimotor.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_djiMotor_c_0818c4ba____RRX multiply defined (by djimotor.o and djimotor.o).
R1\R1.axf: Error: L6200E: Symbol __asm___16_remote_control_c_d71f1673____REV16 multiply defined (by remote_control.o and remote_control.o).
R1\R1.axf: Error: L6200E: Symbol __asm___16_remote_control_c_d71f1673____REVSH multiply defined (by remote_control.o and remote_control.o).
R1\R1.axf: Error: L6200E: Symbol __asm___16_remote_control_c_d71f1673____RRX multiply defined (by remote_control.o and remote_control.o).
R1\R1.axf: Error: L6200E: Symbol __asm___8_ball_cpp_a168e0ee___Z7__REV16j multiply defined (by ball.o and ball.o).
R1\R1.axf: Error: L6200E: Symbol __asm___8_ball_cpp_a168e0ee___Z7__REVSHs multiply defined (by ball.o and ball.o).
R1\R1.axf: Error: L6200E: Symbol __asm___8_ball_cpp_a168e0ee___Z5__RRXj multiply defined (by ball.o and ball.o).
R1\R1.axf: Error: L6200E: Symbol __asm___9_shoot_cpp_24247dc0___Z7__REV16j multiply defined (by shoot.o and shoot.o).
R1\R1.axf: Error: L6200E: Symbol __asm___9_shoot_cpp_24247dc0___Z5__RRXj multiply defined (by shoot.o and shoot.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_initTask_c_1acb3ba9____REV16 multiply defined (by inittask.o and inittask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_initTask_c_1acb3ba9____REVSH multiply defined (by inittask.o and inittask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___10_initTask_c_1acb3ba9____RRX multiply defined (by inittask.o and inittask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___12_ballTask_cpp_ball___Z7__REV16j multiply defined (by balltask.o and balltask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___12_ballTask_cpp_ball___Z7__REVSHs multiply defined (by balltask.o and balltask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___12_ballTask_cpp_ball___Z5__RRXj multiply defined (by balltask.o and balltask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_encodeCan_cpp_dca83ed4___Z7__REV16j multiply defined (by encodecan.o and encodecan.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_encodeCan_cpp_dca83ed4___Z7__REVSHs multiply defined (by encodecan.o and encodecan.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_encodeCan_cpp_dca83ed4___Z5__RRXj multiply defined (by encodecan.o and encodecan.o).
R1\R1.axf: Error: L6200E: Symbol __asm___11_nucTask_cpp_3f7e051c___Z7__REV16j multiply defined (by nuctask.o and nuctask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___11_nucTask_cpp_3f7e051c___Z7__REVSHs multiply defined (by nuctask.o and nuctask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___11_nucTask_cpp_3f7e051c___Z5__RRXj multiply defined (by nuctask.o and nuctask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_shootTask_cpp_shoot___Z7__REV16j multiply defined (by shoottask.o and shoottask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_shootTask_cpp_shoot___Z7__REVSHs multiply defined (by shoottask.o and shoottask.o).
R1\R1.axf: Error: L6200E: Symbol __asm___13_shootTask_cpp_shoot___Z5__RRXj multiply defined (by shoottask.o and shoottask.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 30 error messages.
"R1\R1.axf" - 30 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:02

View File

@ -1 +1 @@
2025/7/9 7:17:12
2025/7/10 17:27:12

View File

@ -190,6 +190,16 @@
<WinNumber>1</WinNumber>
<ItemText>a,0x0A</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>and1,0x0A</ItemText>
</Ww>
<Ww>
<count>8</count>
<WinNumber>1</WinNumber>
<ItemText>test_distance</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow4>
<Mm>
@ -957,7 +967,7 @@
<Group>
<GroupName>User/device</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -1049,7 +1059,7 @@
<Group>
<GroupName>User/module</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -1081,7 +1091,7 @@
<Group>
<GroupName>User/task</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -16,7 +16,7 @@
#endif
#define ONE_CONTROL 1
#define ONE_CONTROL 0
//是否使用大疆DT7遥控器
#ifndef DT7

View File

@ -10,11 +10,11 @@ extern RC_ctrl_t rc_ctrl;
extern int ball_exit;
// 伸缩
//外死点132 外130 中119.12 内92 限位90
//外死点89 外85 中75 内49 限位46
#define I_ANGLE 92
#define O_ANGLE 130
#define WAIT_POS 119
#define I_ANGLE 49
#define O_ANGLE 85
#define WAIT_POS 75
// PE11 气缸git stash apply

View File

@ -15,7 +15,7 @@ extern RC_ctrl_t rc_ctrl;
NUC_t nuc_v;
float vofa[8];
double test_distance;
double test_distance=4.0;
// sw[7]👆 1694 中 1000 👇306
// sw[2]👆 1694 👇306
@ -39,7 +39,7 @@ const fp32 Shoot::M2006_angle_PID[3] = {15, 0.1, 0};
#define CHANEGE_POS -205
#define GO_ERROR 1.0f
#define Tigger_DO 0
#define Tigger_ZERO 138
#define Tigger_ZERO 125
#define Tigger_ERROR 3
float knob_increment;
@ -99,7 +99,7 @@ float shoot_fitting(float x)
float pass_fitting(float x)
{
return 1.1790172f * x * x + 15.983755f * x + -172.04664f + 1.6f;
return 1.1790172f * x * x + 15.983755f * x + -172.04664f + 1.6f -2.0f;
}
void Shoot::distanceGet(const NUC_t &nuc_v)
@ -231,6 +231,8 @@ void Shoot::rc_mode()
#if ONE_CONTROL == 0
//float and1=-1.0f;
float and1=0;
void Shoot::shoot_control()
{
@ -241,7 +243,7 @@ void Shoot::shoot_control()
{
case VSION:
//fire_pos = distance; // 视觉拟合的力
fire_pos =shoot_fitting(distance)+2.0f;
fire_pos =shoot_fitting(test_distance)+2.0f+and1;
//fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置
switch (rc_key)
@ -284,7 +286,7 @@ void Shoot::shoot_control()
case PASS:
// 实时可调蓄力位置
//fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置
fire_pos =pass_fitting(pass_distance)+2.0f;
fire_pos =pass_fitting(pass_distance);
switch (rc_key)
{
case DOWN1:
@ -407,6 +409,10 @@ void Shoot::RemoveError()
#if ONE_CONTROL
//float and1=-1.5f;
float and1=0;
float and2=0;
void Shoot::shoot_control()
{
@ -421,7 +427,7 @@ void Shoot::shoot_control()
switch (mode_key)
{
case VSION:
fire_pos = shoot_fitting(4); // 视觉拟合的力
fire_pos = shoot_fitting(distance)+and1; // 视觉拟合的力
//fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置
switch (rc_key)
@ -439,8 +445,8 @@ void Shoot::shoot_control()
if (feedback.fd_gopos >= fire_pos - GO_ERROR && feedback.fd_gopos <= fire_pos + GO_ERROR)
{
shoot_wait = 1;
BSP_Buzzer_Start();
BSP_Buzzer_Set(1, 500);
//BSP_Buzzer_Start();
//BSP_Buzzer_Set(1, 500);
}
}
@ -453,7 +459,7 @@ void Shoot::shoot_control()
if (feedback.fd_tpos >= Tigger_ZERO - 20)
{
BSP_Buzzer_Stop();
//BSP_Buzzer_Stop();
currentState = SHOOT_IDLE;
osThreadFlagsClear(EXTEND_OK);
osThreadFlagsClear(READY_TELL); // 蓄力标志位
@ -477,8 +483,7 @@ void Shoot::shoot_control()
switch (rc_key)
{
case MIDDLE1:
//fire_pos = pass_fitting(distance);
fire_pos = pass_fitting(pass_distance);
fire_pos = pass_fitting(pass_distance)+and2;
if ((shoot_thread & READY_TELL) && !(shoot_thread & EXTEND_OK))
{
// 只收到READY_TELL且未收到EXTEND_OK时顶部蓄力流程
@ -493,8 +498,8 @@ void Shoot::shoot_control()
if (feedback.fd_gopos >= fire_pos - GO_ERROR && feedback.fd_gopos <= fire_pos + GO_ERROR)
{
shoot_wait = 1;
BSP_Buzzer_Start();
BSP_Buzzer_Set(1, 500);
// BSP_Buzzer_Start();
// BSP_Buzzer_Set(1, 500);
}
}
// 没收到READY_TELL不做任何蓄力
@ -509,7 +514,7 @@ void Shoot::shoot_control()
if (feedback.fd_tpos >= Tigger_ZERO - 20)
{
BSP_Buzzer_Stop();
//BSP_Buzzer_Stop();
currentState = SHOOT_IDLE;
osThreadFlagsClear(EXTEND_OK);
osThreadFlagsClear(READY_TELL); // 蓄力标志位
@ -539,7 +544,7 @@ void Shoot::shoot_control()
control_pos = WAIT_POS; //-209
go1.Pos = control_pos;
limit_speed = TO_TOP; // 快速上去
if(feedback.fd_gopos < -149)
if(feedback.fd_gopos < WAIT_POS)
{
t_posSet = Tigger_ZERO; // 扳机松开
//osThreadFlagsSet(task_struct.thread.ball, DEF_READY);
@ -571,7 +576,7 @@ void Shoot::shoot_control()
trigger_control();
}
int a=0;
// 配合运球到发射
void Shoot ::ball_receive()
{
@ -586,12 +591,12 @@ void Shoot ::ball_receive()
{
control_pos = TOP_POS;
limit_speed = TO_TOP; // 快速上去
a++;
}
if (feedback.fd_gopos < -209)
{
a++;
currentState = GO_TOP; // 切换到准备发射状态
}
}
@ -636,7 +641,7 @@ void Shoot::RemoveError()
control_pos = INIT_POS;
BSP_Buzzer_Stop();
}
limit_speed = 3.0f; // 慢慢送上去
limit_speed = 5.0f; // 慢慢送上去
go1.Pos = control_pos;
}