From f27fc7399d4c8866fc6d74bbf29123771a7617b3 Mon Sep 17 00:00:00 2001 From: air <30444667+sszdot@users.noreply.github.com> Date: Mon, 24 Mar 2025 19:04:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Atest=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E8=BF=98=E5=8E=9F=E5=89=8D=E6=95=B0=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E4=B8=AA=E7=89=88=E6=9C=AC=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B?= =?UTF-8?q?=E3=80=91=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91?= =?UTF-8?q?=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 Revert "【类 型】:factor" This reverts commit 8191c2ef39159990d621d5cf58a33f4b2eca2a74. --- src/FoodDeliveryBase.cpp | 1 + src/main.cpp | 16 +--------------- src/motocontrol.h | 5 ++--- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/FoodDeliveryBase.cpp b/src/FoodDeliveryBase.cpp index 0a1ef66..92c37db 100644 --- a/src/FoodDeliveryBase.cpp +++ b/src/FoodDeliveryBase.cpp @@ -306,6 +306,7 @@ void FoodCube::playText(String str, bool flying) { command[index++] = (int)vstr[i]; } + logln("playText"); /* log("sendplay:"); for (int i = 0; i < sizeof(command); i++) { diff --git a/src/main.cpp b/src/main.cpp index e738cdf..dd13ba1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -401,11 +401,7 @@ void loop() // sercomm.getcommand(); // 得到控制命令 button_checktop.tick(); // 按钮 button_down.tick(); // 按钮 - fc.logln("hello"); - fc.logln("hello"); - fc.logln("hello"); - fc.logln("hello"); - button_up.tick(); // 按钮 + button_up.tick(); // 按钮 button_test.tick(); motocontrol.setweight(pullweight); // 告诉电机拉的重量 motocontrol.update(); // 电机控制 @@ -648,16 +644,6 @@ void up_action(float motospeed) // 放线按钮--单击 void downbtn_click() { - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); - fc.logln("downbtn_click"); ESP_LOGD(MOUDLENAME, "Down_click"); _checkweightcal = true; // 检测是否需要校准称重传感器--在下放停止时检测 _checkweighttimes = 0; diff --git a/src/motocontrol.h b/src/motocontrol.h index d79ca51..332e656 100644 --- a/src/motocontrol.h +++ b/src/motocontrol.h @@ -4,9 +4,8 @@ #include "moto.h" #include -#define ROPE_MAXLENGTH 700 // 最多能放700cm---实际绳子应该比这个长750之类的 -// #define WHEEL_DIAMETER 3.8 // 轮子直径cm 3公斤载重飞机 大轮 -#define WHEEL_DIAMETER 2.3 // 轮子直径cm 10公斤载重飞机 小轮 +#define ROPE_MAXLENGTH 700 // 最多能放700cm---实际绳子应该比这个长750之类的 +#define WHEEL_DIAMETER 3.8 // 轮子直径cm #define WHEEL_PERIMETER (WHEEL_DIAMETER * 3.1416) // 轮子周长 #define ROPE_MAXCOUNT (ROPE_MAXLENGTH / WHEEL_PERIMETER) // 最大圈数