From 9aaf45c0bfc7e43945fe3bae031037dd368882b9 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 8 Oct 2023 20:54:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=87=E4=BB=A4=E4=B8=B2?= =?UTF-8?q?=E5=8F=A3=E5=81=9C=E6=AD=A2=E6=8E=A5=E6=94=B6=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk | 1 + usrc/main.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 160000 sdk diff --git a/sdk b/sdk new file mode 160000 index 0000000..3307f7a --- /dev/null +++ b/sdk @@ -0,0 +1 @@ +Subproject commit 3307f7a4c801857b8cd9cab5abb290f88ffc3155 diff --git a/usrc/main.cpp b/usrc/main.cpp index 2dc8ccc..2d90f37 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -426,22 +426,24 @@ void regfn() { cmdScheduler.registerCmd("mini_servo_set_zero", [](int argc, char** argv, CmdScheduler::CmdProcessContext* context) { CHECK_ARGC(1); int id = atoi(argv[1]); + ZLOGI(TAG, "mini_servo_set_zero %d", id); g_feiteservomotor.reCalibration(id, 0); + ZLOGI(TAG, "mini_servo_set_zero %d done", id); }); cmdScheduler.registerCmd("mini_servo_set_4095", [](int argc, char** argv, CmdScheduler::CmdProcessContext* context) { CHECK_ARGC(1); int id = atoi(argv[1]); + ZLOGI(TAG, "mini_servo_set_4095 %d", id); g_feiteservomotor.reCalibration(id, 4095); + ZLOGI(TAG, "mini_servo_set_4095 %d done", id); }); - cmdScheduler.registerCmd("move_to", [](int argc, char** argv, CmdScheduler::CmdProcessContext* context) { + cmdScheduler.registerCmd("mini_servo_move_to", [](int argc, char** argv, CmdScheduler::CmdProcessContext* context) { CHECK_ARGC(3); int id = atoi(argv[1]); int pos = atoi(argv[2]); int v = atoi(argv[3]); - - // bool moveTo(uint8_t id, int16_t pos, int16_t speed, uint16_t torque); - - g_feiteservomotor.moveTo(id, pos, v,0); + ZLOGI(TAG, "mini_servo_move_to %d %d %d", id, pos, v); + g_feiteservomotor.moveTo(id, pos, v, 0); }); #if 0