No CAM STAB in MultiWii_dev_r1240

Post Reply
Polleke
Posts: 39
Joined: Fri Jul 22, 2011 3:39 pm
Location: Steenbergen

No CAM STAB in MultiWii_dev_r1240

Post by Polleke »

Hi all,

I switched from MultiWii 2.0 to MultiWii_dev_r1240.
Very nice ALT HOLD behavior… :D …… but now my Cam Stab isn’t working properly anymore. :(
However it did in the 2.0 version.
I (un)commented (on/off) following lines in the config.h:

#define GIMBAL (comment or uncomment, makes no difference)
#define SERVO_MIX_TILT (comment or uncomment, makes no difference)
#define SERVO_TILT (comment or uncomment, makes no difference)

I’ve turned on Cam Stab in the GUI.
The servo’s jitter and the roll(function) servo goes all in one corner. :shock:

What am I doing wrong???

eXc
Posts: 8
Joined: Mon Oct 08, 2012 6:51 am
Location: Hamm/Germany

Re: No CAM STAB in MultiWii_dev_r1240

Post by eXc »

Hello,

i've started testing different gimbal settings too and can recognize the same experience. On dev versions my servos are twitching too but also in unstabilized mode. Will test further and look where the diffences between both versions are.

best regards
Christian

Polleke
Posts: 39
Joined: Fri Jul 22, 2011 3:39 pm
Location: Steenbergen

Re: No CAM STAB in MultiWii_dev_r1240

Post by Polleke »

eXc wrote:Hello,

i've started testing different gimbal settings too and can recognize the same experience. On dev versions my servos are twitching too but also in unstabilized mode. Will test further and look where the diffences between both versions are.

best regards
Christian


Hi Cristian,

I've "solved" my problem by flashing my board with this config: MultiWii_2_1_NewBaroPIDVario4Final and my problem is gone :D
Its got a very good ALTHOLD also.
Perhaps it is something for you to try ;)

Best regards,
Paul

eXc
Posts: 8
Joined: Mon Oct 08, 2012 6:51 am
Location: Hamm/Germany

Re: No CAM STAB in MultiWii_dev_r1240

Post by eXc »

Hello,

that's right, have tested this version too but also want to be able to use the newest dev's with all their functions. All 2.1 Versions will work, but i have found the problem in my case. Perhaps you will give it a try. Find the following part in Output.ino (Line 55ff. in my case) and change the last values as i did.

Code: Select all

  #if defined(SERVO)
    #if defined(AIRPLANE)|| defined(HELICOPTER)
      // To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000}; // last value now 8000 instead of 320
    #else
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,320}; // last value now 320 instead of 8000
    #endif
  #endif


Best regards
Christian

Polleke
Posts: 39
Joined: Fri Jul 22, 2011 3:39 pm
Location: Steenbergen

Re: No CAM STAB in MultiWii_dev_r1240

Post by Polleke »

eXc wrote:Hello,

that's right, have tested this version too but also want to be able to use the newest dev's with all their functions. All 2.1 Versions will work, but i have found the problem in my case. Perhaps you will give it a try. Find the following part in Output.ino (Line 55ff. in my case) and change the last values as i did.

Code: Select all

  #if defined(SERVO)
    #if defined(AIRPLANE)|| defined(HELICOPTER)
      // To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000}; // last value now 8000 instead of 320
    #else
      volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,320}; // last value now 320 instead of 8000
    #endif
  #endif


Best regards
Christian


In these lines, my values are at the moment: "volatile uint8_t atomicServo[8] = {125,125,125,125,125,125,125,5};"
and: "volatile uint8_t atomicServo[8] = {125,125,125,125,125,125,125,125};"

Before I change anything (because it is working fine now :D Gimbal AND ALThold), I want to ask you.
What is the purpose of changing these values?
BTW, I don't know anything about programming the Arduino....... ;)

eXc
Posts: 8
Joined: Mon Oct 08, 2012 6:51 am
Location: Hamm/Germany

Re: No CAM STAB in MultiWii_dev_r1240

Post by eXc »

I don't really know where these values are for, but i have compared the two version 2.1, dev_1240 and dev_1277 and this was the only difference between these ones in case of cam stabilization.

Although i said that it worked for me, must not for everyone else. But perhaps you can give it a try to see if it is working.

eXc
Posts: 8
Joined: Mon Oct 08, 2012 6:51 am
Location: Hamm/Germany

Re: No CAM STAB in MultiWii_dev_r1240

Post by eXc »

Polleke wrote:What is the purpose of changing these values?


Perhaps someone who knows can tell us that and explain every value.

Christian

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: No CAM STAB in MultiWii_dev_r1240

Post by PatrikE »

The values is there to center all servos at init.
The last value is different because you dont want to set throttle to 50% at startup!... :o
But only If plane or Heli is selected servo 7 is hardcoded as throttle!

Gimbal on A0 & A1 is controlled by the 2 first values.
For Pro Mini and other 328 based cards center is 125.
For mega and some other boards center is 8000.

/Patrik

defkom
Posts: 9
Joined: Sun Jan 06, 2013 10:27 am

Re: No CAM STAB in MultiWii_dev_r1240

Post by defkom »

Hi guys,
I am trying to get MultiWii_dev_r1240 runnning with camstab as a Y6.
I need to configure board orientation shift as well.
I followed eXc's hints for the output.ino put this did not change a thing.
Did anybody ever try this as well?
Cheers

PS: CAM Stab works fine, as soon as I flash my old 2.1 config (but this does not support board orientation shift)

Post Reply