You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For controlling the tilt/roll (or tilt/pan) of a servo gimbal via RC channel(s)
ot sure if this is already handled in the beta versions/forks, but I have found
this works well, with or with out cam stabiisation:
In config.h
#define SERVO_TILT // Existing code
#define CAM_TILT_CHAN AUX4 // Select RC channel to control gimbal tilt
#define CAM_ROLL_CHAN YAW // Select RC channel to control gimbal roll
In Output.cpp
#if defined(SERVO_TILT) // Existing code
servo[0] = get_middle(0);
servo[1] = get_middle(1);
if (rcOptions[BOXCAMSTAB]) {
servo[0] += ((int32_t)conf.servoConf[0].rate * att.angle[PITCH]) /50L;
servo[1] += ((int32_t)conf.servoConf[1].rate * att.angle[ROLL]) /50L;
}
// Direct camera tilt/pan, additive - new code
#ifdef CAM_PITCH_CHAN
servo[0] += constrain(rcData[CAM_PITCH_CHAN],900,2100)-MIDRC;
#endif
#ifdef CAM_ROLL_CHAN
servo[1] += constrain(rcData[CAM_ROLL_CHAN],900,2100)-MIDRC;
#endif
Original issue reported on code.google.com by pwbec...@hotmail.com on 8 Feb 2015 at 8:03
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
pwbec...@hotmail.com
on 8 Feb 2015 at 8:03The text was updated successfully, but these errors were encountered: