磁环松了
This commit is contained in:
parent
b022b46730
commit
a056dbcb8a
8
MDK-ARM/.vscode/uv4.log
vendored
8
MDK-ARM/.vscode/uv4.log
vendored
@ -1,8 +1,12 @@
|
||||
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin'
|
||||
Build target 'R1'
|
||||
compiling nuc.c...
|
||||
compiling shootTask.cpp...
|
||||
compiling ball.cpp...
|
||||
compiling ballTask.cpp...
|
||||
compiling shoot.cpp...
|
||||
linking...
|
||||
Program Size: Code=32904 RO-data=1832 RW-data=268 ZI-data=32220
|
||||
Program Size: Code=32916 RO-data=1832 RW-data=268 ZI-data=32220
|
||||
FromELF: creating hex file...
|
||||
"R1\R1.axf" - 0 Error(s), 0 Warning(s).
|
||||
Build Time Elapsed: 00:00:05
|
||||
Build Time Elapsed: 00:00:08
|
||||
|
2
MDK-ARM/.vscode/uv4.log.lock
vendored
2
MDK-ARM/.vscode/uv4.log.lock
vendored
@ -1 +1 @@
|
||||
2025/7/2 14:06:43
|
||||
2025/7/2 19:36:56
|
@ -153,24 +153,7 @@
|
||||
<Name>-U00160029510000164E574E32 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>94</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>../Core/Src/main.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Breakpoint/>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
|
@ -10,9 +10,12 @@ extern RC_ctrl_t rc_ctrl;
|
||||
extern int ball_exit;
|
||||
|
||||
// 伸缩
|
||||
#define I_ANGLE 147
|
||||
#define O_ANGLE 187
|
||||
#define WAIT_POS 170
|
||||
//外死点168 外163 中150 内127 限位124.8
|
||||
#define I_ANGLE 127
|
||||
#define O_ANGLE 163
|
||||
#define WAIT_POS 150
|
||||
#define IN 124.8
|
||||
#define OUT 168
|
||||
|
||||
// PE11 气缸
|
||||
|
||||
@ -75,7 +78,7 @@ void Ball::rc_mode()
|
||||
}
|
||||
if (rc_ctrl.sw[5] == 200)
|
||||
{
|
||||
ready_key = 0; // 默认不准备
|
||||
ready_key = DEF; // 默认不准备
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,17 +237,19 @@ void Ball::ball_control()
|
||||
ballHadling();
|
||||
break;
|
||||
}
|
||||
|
||||
Send_control();
|
||||
}
|
||||
// 防守
|
||||
else
|
||||
else if(ready_key == DEF)
|
||||
{
|
||||
xiaomi.position = I_ANGLE; // 保持收回
|
||||
HAL_GPIO_WritePin(CLOSE_GPIO_Port, CLOSE_Pin, GPIO_PIN_RESET); // 确保爪气缸关闭
|
||||
HAL_GPIO_WritePin(DOWN_GPIO_Port, DOWN_Pin, GPIO_PIN_RESET); // 确保下气缸关闭
|
||||
|
||||
Send_control();
|
||||
}
|
||||
|
||||
// 发送小米电机控制数据
|
||||
Send_control();
|
||||
}
|
||||
|
||||
// 任务通知来作全过程
|
||||
|
@ -39,7 +39,8 @@ typedef enum
|
||||
DOWN2,
|
||||
IN,
|
||||
OUT,
|
||||
SIDE
|
||||
SIDE,
|
||||
DEF
|
||||
}ball_rc_mode;
|
||||
|
||||
// 定义光电传感器检测宏
|
||||
|
Loading…
Reference in New Issue
Block a user