From fbe4e8d7c673dfc5be2f8682ffee8500afbd3b33 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 21 Jul 2024 16:03:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=88=B5=E6=9C=BA=E6=89=AD?= =?UTF-8?q?=E7=9F=A9=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=8E=B7=E5=8F=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E9=94=99=E8=AF=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .settings/language.settings.xml | 4 ++-- a8000_protocol | 2 +- sdk/components/mini_servo_motor/feite_servo_motor.cpp | 10 ++++------ .../step_motor_ctrl_module/step_motor_ctrl_module.cpp | 4 ---- usrc/subboards/subboard90_optical_module/optical_module_v2.cpp | 3 --- 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 0495c7d..1723465 100644 --- a/.settings/language.settings.xml +++ b/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/a8000_protocol b/a8000_protocol index 8f3e18d..36523be 160000 --- a/a8000_protocol +++ b/a8000_protocol @@ -1 +1 @@ -Subproject commit 8f3e18d35b26becec3236055a1324e31e8d0f40c +Subproject commit 36523bea3565257b6033f75fd1adb343602532e9 diff --git a/sdk/components/mini_servo_motor/feite_servo_motor.cpp b/sdk/components/mini_servo_motor/feite_servo_motor.cpp index b64326f..4d2a16f 100644 --- a/sdk/components/mini_servo_motor/feite_servo_motor.cpp +++ b/sdk/components/mini_servo_motor/feite_servo_motor.cpp @@ -333,13 +333,11 @@ bool FeiTeServoMotor::runInMode2(uint8_t id, int32_t torque) { DO(write_reg(id, kRegServoRunTime, torque)); #endif int32_t velocity = 10000; - if (torque < 0) { - velocity = -10000; - } else if (torque == 0) { - velocity = 0; + if (torque > 0) { + return runInMode0(id, abs(torque), velocity, 3590); + } else { + return runInMode0(id, abs(torque), velocity, 10); } - - return runInMode1(id, abs(torque), velocity); } return false; } diff --git a/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp b/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp index d750d3d..5312cd3 100644 --- a/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp +++ b/sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp @@ -73,10 +73,6 @@ int32_t StepMotorCtrlModule::module_xxx_reg(int32_t param_id, bool read, int32_t step_motor_active_cfg(); break; - case kreg_step_motor_dzero_pos: - // - - break; default: break; diff --git a/usrc/subboards/subboard90_optical_module/optical_module_v2.cpp b/usrc/subboards/subboard90_optical_module/optical_module_v2.cpp index e519237..04f8844 100644 --- a/usrc/subboards/subboard90_optical_module/optical_module_v2.cpp +++ b/usrc/subboards/subboard90_optical_module/optical_module_v2.cpp @@ -124,9 +124,6 @@ float OpticalModuleV2::t_detector_raw_gain_to_gain(int32_t gain) { } int32_t OpticalModuleV2::module_xxx_reg(int32_t param_id, bool read, int32_t& val) { - if (param_id == kreg_opt_module_do_action0 && !read) { - return 0; - } switch (param_id) { PROCESS_REG(kreg_a8k_opt_t_pos_offset, REG_GET(m_reg.t_pos_offset), REG_SET(m_reg.t_pos_offset));