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