完结撒花

This commit is contained in:
ws 2025-07-16 22:31:15 +08:00
parent b57c09bce5
commit 241bf2f631
6 changed files with 60 additions and 33 deletions

View File

@ -162,3 +162,5 @@
[info] Log at : 2025/7/16|22:15:00|GMT+0800
[info] Log at : 2025/7/16|22:26:06|GMT+0800

View File

@ -1,4 +1,9 @@
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin'
Build target 'R1'
compiling ballTask.cpp...
compiling shootTask.cpp...
linking...
Program Size: Code=31984 RO-data=1832 RW-data=272 ZI-data=32264
FromELF: creating hex file...
"R1\R1.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:01
Build Time Elapsed: 00:00:05

View File

@ -1 +1 @@
2025/7/16 22:18:46
2025/7/16 22:30:59

View File

@ -5,19 +5,60 @@ r1上层
## 外设
+ CAN1
- 扳机2006 id:0x205
- 三摩擦 id:123
+ 扳机2006 id:0x201
+ CAN2
+ 小米电机 id:1
+ UART
- uart1 波特率4000000 id2
- uart6 nuc
- uart3 遥控器接收
+ uart1 波特率4000000 id2
+ uart6 nuc
+ uart3 遥控器接收
+ GPIO
- PI6运球光电
- PE11 运球气缸
+ PI6运球光电
+ PE13 爪气缸
+ PE14 砸气缸
## 遥控器
## 待解决
+ 用了将运球和伸缩绑定到一起 √
+ 串口收数加个滤波 √
## 思路
+ 👆 传球档 👆 配合档
+ 中 初始档 中 初始档
+ 👇 发射档 👇 运球档
+ 起步遥控档我直接蓄力准备接球 + 可多次的运球
+ 缩回转移球
+ 蓄力到位,收到掉落信号和已伸出信号
+ 根据视觉拟合信息的动态调整
+ 拨置👇发射清空掉落信号
+ 用一个攻守方档
+ 初始移动到最上面 更待蓄力(不管攻方守方都在最上面等待)
+ 攻方时拨下立马蓄力并伸出(可小角度)
+ 守方时不动并保持缩回
+ 👇 运球档正常运球
+ 中 初始档直接缩回
+ 👆 配合档 完成配合并伸出才能发射
+ 传球模式
+ 自动
+ 底盘的传球对准档拨下
+ 我的蓄力进入传球拟合
+ 继续拨下发射
+ 手动
+ 目前只能打固定距离
+ 切相同传球档 自动蓄力到传球力度
+ 发射档发射
+ 图传多距离
+ 传球档
+ 旋钮+看图传点位调整
+ 修复
+ 6.29 发射误操作导致没有拟合作用就射了(已修复)
+ 6.29 串口不稳定 重新拔插一下
+ 6.29 nuc位置更新慢
+ 6.29 添加光电上电保护防止跳尺(已添加)

View File

@ -8,11 +8,7 @@
#include "vofa.h"
extern RC_ctrl_t rc_ctrl;
Ball ball;
//float vofa[8];
//检查光电
int abc=0;
int aaaa=146;
extern int speedm;
@ -32,20 +28,10 @@ void FunctionBall(void *argument)
#ifdef DEBUG
task_struct.stack_water_mark.ball = osThreadGetStackSpace(osThreadGetId());
#endif
//abc=HAL_GPIO_ReadPin(up_ball_GPIO_Port, up_ball_Pin);
abc=HAL_GPIO_ReadPin(BALL_GPIO_Port, BALL_Pin); // 0为到位
ball.rc_mode(); // 遥控器模式
ball.ball_control(); // 控制球的动作
// HAL_GPIO_WritePin(CLOSE_GPIO_Port, CLOSE_Pin, GPIO_PIN_SET); // 确保爪气缸关闭
// HAL_GPIO_WritePin(DOWN_GPIO_Port, DOWN_Pin, GPIO_PIN_SET); // 确保下气缸关闭
// ball.xiaomi.position = aaaa;
// CAN_XiaoMi(1,&ball.xiaomi,&hcan2);
tick += delay_tick; /* 计算下一个唤醒时刻 */
osDelayUntil(tick);

View File

@ -10,7 +10,7 @@ extern RC_ctrl_t rc_ctrl;
Shoot shoot;
NUC_t nucData; // 自瞄
int aaaxxx=0;
void FunctionShoot(void *argument)
{
@ -35,13 +35,6 @@ while(1)
shoot.shoot_control();
// shoot.t_posSet=aaaxxx;
// shoot.trigger_control();
// shoot.GO_SendData(goangle,5);
// shoot.shoot_control();
// shoot.t_posSet=goangle;
// shoot.trigger_control();
tick += delay_tick; /* 计算下一个唤醒时刻 */
osDelayUntil(tick);