Skip to content

Commit dc38945

Browse files
committed
sync remote control logic for pa_hero same with HERO
1 parent f9b1616 commit dc38945

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

dev/application/param_adjusts/pa_hero/pa_hero.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,13 @@ class TopControlThread : public BaseStaticThread<512> {
286286
/// Gimbal Response Test through Remote Controller
287287
gimbal_yaw_target_angle_ +=
288288
-Remote::rc.ch0 * 0.7f;
289-
gimbal_pitch_target_angle_ += Remote::rc.ch1 * 0.3f;
290-
289+
if (Remote::rc.ch1 > 0)
290+
gimbal_pitch_target_angle_ += Remote::rc.ch1 * gimbal_pitch_max_angle * 0.1;
291+
else
292+
gimbal_pitch_target_angle_ -= Remote::rc.ch1 * gimbal_pitch_min_angle * 0.1;
291293
VAL_CROP(gimbal_pitch_target_angle_, gimbal_pitch_max_angle, gimbal_pitch_min_angle);
292294
// if the right button is up, adjust Pitch only, if it is down, adjust Yaw only
293-
// if it it in the middle then both
295+
// if it is in the middle then both
294296
switch(Remote::rc.s2) {
295297
case Remote::S_UP:
296298
gimbal_yaw_target_angle_ = 0.0f;

0 commit comments

Comments
 (0)