Skip to content

Commit

Permalink
lower the remote sensitivity reduce the overshoot of pitch
Browse files Browse the repository at this point in the history
  • Loading branch information
tz61 committed Mar 16, 2024
1 parent dc38945 commit e9971e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions dev/application/param_adjusts/pa_hero/pa_hero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ class TopControlThread : public BaseStaticThread<512> {
}
/// Gimbal Response Test through Remote Controller
gimbal_yaw_target_angle_ +=
-Remote::rc.ch0 * 0.7f;
-Remote::rc.ch0 *gimbal_rc_yaw_max_speed * USER_THREAD_INTERVAL / 1000.0f;
if (Remote::rc.ch1 > 0)
gimbal_pitch_target_angle_ += Remote::rc.ch1 * gimbal_pitch_max_angle * 0.1;
gimbal_pitch_target_angle_ += Remote::rc.ch1 * gimbal_pitch_max_angle * 0.07;
else
gimbal_pitch_target_angle_ -= Remote::rc.ch1 * gimbal_pitch_min_angle * 0.1;
gimbal_pitch_target_angle_ -= Remote::rc.ch1 * gimbal_pitch_min_angle * 0.07;
VAL_CROP(gimbal_pitch_target_angle_, gimbal_pitch_max_angle, gimbal_pitch_min_angle);
// if the right button is up, adjust Pitch only, if it is down, adjust Yaw only
// if it is in the middle then both
Expand Down
4 changes: 2 additions & 2 deletions dev/application/vehicles/hero/user_hero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ void UserH::UserThread::main() {

float pitch_target;
if (Remote::rc.ch1 > 0)
pitch_target += Remote::rc.ch1 * gimbal_pitch_max_angle * 0.1;
pitch_target += Remote::rc.ch1 * gimbal_pitch_max_angle * 0.07;
else
pitch_target -= Remote::rc.ch1 * gimbal_pitch_min_angle * 0.1; // GIMBAL_PITCH_MIN_ANGLE is negative
pitch_target -= Remote::rc.ch1 * gimbal_pitch_min_angle * 0.07; // GIMBAL_PITCH_MIN_ANGLE is negative
// ch1 use up as positive direction, while GimbalLG also use up as positive direction

VAL_CROP(pitch_target, gimbal_pitch_max_angle, gimbal_pitch_min_angle);
Expand Down

0 comments on commit e9971e7

Please sign in to comment.