Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual control of camera servo gimbal #19

Open
GoogleCodeExporter opened this issue Jun 1, 2015 · 1 comment
Open

Manual control of camera servo gimbal #19

GoogleCodeExporter opened this issue Jun 1, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 8 Feb 2015 at 8:03

@GoogleCodeExporter
Copy link
Author

Not getting any movement of servos on s1 (aux3) or s2 (aux4). Dump attached.

Original comment by [email protected] on 17 Apr 2015 at 11:35

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant