camstab without aux3 / 4 input

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

camstab without aux3 / 4 input

Post by wilco1967 »

I have tried cambstab again.
In (much) earlier versions, there were no aux3 and aux4 inputs, so the camstab would just stabilize.

Now I found, that if I activate camstab, it ALSO responds to aux3 and aux4 inputs. I like the aux3 and 4 to be set up as switches to control various options, but doing so, it will cause the camera to jump when I flick a switch....

Is there a simple trick to disable aux3 and aux4 mixing to the camstab, so it only stabilizes, or must that be disabled somewhere in the source code ?

EDIT.

I found it seems to be hardcoded in output.pde.... it works like I want when I remove the Aux3 / aux4 reverences in servo_tilt.
Perhaps a #define could be added as an option ?

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: camstab without aux3 / 4 input

Post by mr.rc-cam »

I'm assuming you are using SERVO_TILT and not GIMBAL. This is patch is untested, so please don't shoot me if it doesn't work:

Open output.pde. Find this:

Code: Select all

  #ifdef SERVO_TILT
    if (rcOptions & activate[BOXCAMSTAB] ) {
      servo[1] = constrain(TILT_PITCH_MIDDLE + TILT_PITCH_PROP * angle[PITCH] /16 + rcData[CAMPITCH]-1500 , TILT_PITCH_MIN, TILT_PITCH_MAX);
      servo[2] = constrain(TILT_ROLL_MIDDLE  + TILT_ROLL_PROP  * angle[ROLL]  /16 + rcData[CAMROLL]-1500, TILT_ROLL_MIN, TILT_ROLL_MAX);
    } else {
      servo[1] = constrain(TILT_PITCH_MIDDLE  + rcData[CAMPITCH]-1500 , TILT_PITCH_MIN, TILT_PITCH_MAX);
      servo[2] = constrain(TILT_ROLL_MIDDLE   + rcData[CAMROLL]-1500,  TILT_ROLL_MIN, TILT_ROLL_MAX);
    }
  #endif


And change to this:

Code: Select all

  #ifdef SERVO_TILT
    if (rcOptions & activate[BOXCAMSTAB] ) {
      servo[1] = constrain(TILT_PITCH_MIDDLE + TILT_PITCH_PROP * angle[PITCH] /16, TILT_PITCH_MIN, TILT_PITCH_MAX);
      servo[2] = constrain(TILT_ROLL_MIDDLE  + TILT_ROLL_PROP  * angle[ROLL]  /16, TILT_ROLL_MIN, TILT_ROLL_MAX);
    } else {
      servo[1] = TILT_PITCH_MIDDLE;
      servo[2] = TILT_ROLL_MIDDLE;
    }
 #endif


If it works out as expected, you will see the CAM1 & CAM2 R/C channels move in the GUI when their sticks are operated, but the SERVO_TILT will not be affected.


- Thomas

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: camstab without aux3 / 4 input

Post by Alexinparis »

wilco1967 wrote:I have tried cambstab again.
In (much) earlier versions, there were no aux3 and aux4 inputs, so the camstab would just stabilize.

Now I found, that if I activate camstab, it ALSO responds to aux3 and aux4 inputs. I like the aux3 and 4 to be set up as switches to control various options, but doing so, it will cause the camera to jump when I flick a switch....

Is there a simple trick to disable aux3 and aux4 mixing to the camstab, so it only stabilizes, or must that be disabled somewhere in the source code ?

EDIT.

I found it seems to be hardcoded in output.pde.... it works like I want when I remove the Aux3 / aux4 reverences in servo_tilt.
Perhaps a #define could be added as an option ?


Hi,
AUX3 & AUX4 were called CAM1 & CAM2 before,
the purpose was to be able to control PITCH&ROLL of the camera via 2 pots on channel 7 & 8 (for trimming view angle for instance)
So it still works as before, but if you use also AUX3 & AUX4 switch, there is this side effect.

freedom
Posts: 1
Joined: Sun Apr 06, 2014 11:40 am

Re: camstab without aux3 / 4 input

Post by freedom »

hallo wilco 1967, i read here that u are using aux 3 and 4 rc input for moving the cam?? right? can u tell me where i should conect the aux3 and aux4 rc inputs on a crius multiwii SE 2.5??, to be able to use aux 3 and aux 4 channels by switches???

'' Now I found, that if I activate camstab, it ALSO responds to aux3 and aux4 inputs. I like the aux3 and 4 to be set up as switches to control various options, but doing so, it will cause the camera to jump when I flick a switch....''

couse my problem is that i dont where to connect the aux 3 and 4 inputs. my resiever has chanels anuf,. but the where to go whit the 2 cables??

thanks thanks alot for any respons, or help!! (gitting a bit nuts of finding the celution)

greetzzz, freedom

Post Reply