diff --git a/src/FoodDeliveryBase.cpp b/src/FoodDeliveryBase.cpp index 88d93c3..99b33c5 100644 --- a/src/FoodDeliveryBase.cpp +++ b/src/FoodDeliveryBase.cpp @@ -796,12 +796,12 @@ void FoodCube::sendSetPositionTargetGlobalInt(double lat_deg, double lon_deg, do // 设置 type_mask,仅启用位置控制字段,其它字段被忽略 sp.type_mask = - (1 << 1) | // 忽略 vx - (1 << 2) | // 忽略 vy - (1 << 3) | // 忽略 vz - (1 << 4) | // 忽略 afx - (1 << 5) | // 忽略 afy - (1 << 6) | // 忽略 afz + (1 << 3) | // 忽略 vx + (1 << 4) | // 忽略 vy + (1 << 5) | // 忽略 vz + (1 << 6) | // 忽略 afx + (1 << 7) | // 忽略 afy + (1 << 8) | // 忽略 afz (1 << 10) | // 忽略 yaw (1 << 11); // 忽略 yaw_rate diff --git a/src/commser.cpp b/src/commser.cpp index ce9537b..bf7cccf 100644 --- a/src/commser.cpp +++ b/src/commser.cpp @@ -194,7 +194,7 @@ void mqtt_receiveCallback(char *topic, byte *payload, unsigned int length) } else { - fc.sendSetPositionTargetGlobalInt(lat, lon, alt); // 发送经纬度和高度 + fc.sendSetPositionTargetGlobalInt(lat, lon, alt); // 发送纬经度和高度 } } else if (key == "autoMode") // 自动auto模式 diff --git a/src/motocontrol.h b/src/motocontrol.h index 56dbb09..4ddfd75 100644 --- a/src/motocontrol.h +++ b/src/motocontrol.h @@ -6,7 +6,8 @@ #define ROPE_MAXLENGTH 700 // 最多能放700cm---实际绳子应该比这个长750之类的 // #define WHEEL_DIAMETER 3.8 // 轮子直径cm -#define WHEEL_DIAMETER 2.3 // 轮子直径cm 小轮子直径 +// #define WHEEL_DIAMETER 2.3 // 轮子直径cm 小轮子直径(实际2cm) +#define WHEEL_DIAMETER 2 // 轮子直径cm 小轮子直径(实际1.7cm) #define WHEEL_PERIMETER (WHEEL_DIAMETER * 3.1416) // 轮子周长 #define ROPE_MAXCOUNT (ROPE_MAXLENGTH / WHEEL_PERIMETER) // 最大圈数