Switch assigned to value change

AdamSnow

New member
I'm wondering if anyone knows of a way to assign a switch (say for example, Channel 7, Front top right of the G4 controller) change the value of something on a helicopter...

I want to be able to switch from heading hold gyro to rate mode by moving this switch... modifying the gyro's setting of "Heading hold mix" from one number to another by activating the switch.

Anyone ever done this, or can someone point me to some documentation so I can research this better?

Thanks all!
 
This is no different than the three position switch.

Load up any other heli, and learn how to modify the switches.
 
opjose said:
This is no different than the three position switch.

Load up any other heli, and learn how to modify the switches.

Hi opjose

I reviewed the switches in other helicopters as well as planes to see how to turn on and off smoke, but I'm not certain I've seen how to change an individual value inside the components listing.

Am I missing something obvious?
 
This can be done, I've done it before on gyro-stabilized helis where I had the cyclic gyros in rate mode when the heli is in normal mode, but then the gyros switched to heading hold mode in idle-up. I'll see if I can dig it up to see how i did it.
 
Well as far as I can tell there is a bug with version of 4.5.032. I loaded up my old flybarless heli with gyroscopic stabilization and the cyclic gyros would not switch back to rate mode when the gain input was set at -100. They were always stuck on heading hold mode. So, it looks like KE messed this feature up somehow. This explains the funny behavior I've noticed on some of the gyro stabilized jets, too.

So, sorry to say, but until the bug gets fixed, I don't think you will be switching between heading hold and rate mode on any models.
 
hornet dave said:
Well as far as I can tell there is a bug with version of 4.5.032. I loaded up my old flybarless heli with gyroscopic stabilization and the cyclic gyros would not switch back to rate mode when the gain input was set at -100. They were always stuck on heading hold mode. So, it looks like KE messed this feature up somehow. This explains the funny behavior I've noticed on some of the gyro stabilized jets, too.

So, sorry to say, but until the bug gets fixed, I don't think you will be switching between heading hold and rate mode on any models.

Thanks for your posts... Would you be willing to share how you did this just for learning and comparing against other helicopters?
 
Sure. I'll use the heli-max 3d as an example (which doesn't fly too terribly badly except for the horrid pitch down tendency in forward flight):

1) Go to Software Radio and right click; select Add -> Add Output Channel. Now a channel 7 appears on the list
2) Rt Click Output Channel 7 and select "add simple input feed"
3) Under Channel 7 :> Input, set Input Channel to Input Channel 7

That has created a new receiver channel, #7, and set it's input as ch 7 from the transmitter.


4) Go to Electronics -> heading hold gyro
5) Set Gain Input to Receiver Channel 7

Now, the way this is supposed to work, with switch #7 in one position (-100), the gyro should be in rate mode. With the switch in the other position, the gyro should be in heading hold mode. However, it makes no difference using the version of G4.5 that i'm running (.032).

So, the only work around I can think of would be to configure two different gyros; one is set up for heading hold mode, the other for rate mode. Make it so the rate gyro is activated, and the heading hold gyro is deactivated, with the switch in one position, and vice versa. It's a pain in the butt but here it goes:

1) Do steps 1-3 above
2) Under Electronics, create a new gyro, re-name it "rate gyro"
3) Set "Rate Gyro as follows:
Axis = Yaw
Control Input = Rx Channel 4
Heading Hold Mix = 0
4) Under Electronics, create three servo mixers. Call them Servo Mixer A, Servo Mixer B, Servo Mixer C.

Ok, here's the scheme. We are going to use servo mixer A to turn on or off the heading hold gyro depending on the position of switch 7. Servo Mixer B will turn on or off the rate gyro. Servo Mixer C mixes servo mixers A and B, and then we will use servo mixer C to create the input to the tail rotor servo.

5) Set servo mixer A like this:
Input 1 = Rx Ch 7
Reverse = Yes
Input 2 = Heading Hold Gyro
Reverse = No
Logic = multiply

6 Set servo mixer B like this:
Input 1 = Rx Ch 7
Reverse = No
Input 2 = Rate Gyro
Reverse = No
Logic = multiply

7) Set mixer C like this:
Input 1 = Servo Mixer A
Reverse = No
Input 2 = Servo Mixer B
Reverse = No
Logic = Add

8) Ok now all we need to do is tell the rudder servo to use mixer C as the input:
Tail Rotor Servo -> Input for this servo = Servo Mixer C

There ya go. Enjoy

-Dave
 
Try loading up the newly posted E-Flite Blade 400

Click on the Gyro.

Notice that the Gyro takes it's "gain input" from a fixed "servo"?

Ok if you wanted to control the gain with a switch, you would add another virtual servo, which would take it's input from a switch.

That's all there is to it.
 
Opjose-

Yes, but does this actually work for you? It doesnt work on mine with 4.5.032, the gyro stays in heading hold mode regardless of the gain input.
 
hornet dave said:
Sure. I'll use the heli-max 3d as an example (which doesn't fly too terribly badly except for the horrid pitch down tendency in forward flight):

1) Go to Software Radio and right click; select Add -> Add Output Channel. Now a channel 7 appears on the list
2) Rt Click Output Channel 7 and select "add simple input feed"
3) Under Channel 7 :> Input, set Input Channel to Input Channel 7

That has created a new receiver channel, #7, and set it's input as ch 7 from the transmitter.


4) Go to Electronics -> heading hold gyro
5) Set Gain Input to Receiver Channel 7

Now, the way this is supposed to work, with switch #7 in one position (-100), the gyro should be in rate mode. With the switch in the other position, the gyro should be in heading hold mode. However, it makes no difference using the version of G4.5 that i'm running (.032).

So, the only work around I can think of would be to configure two different gyros; one is set up for heading hold mode, the other for rate mode. Make it so the rate gyro is activated, and the heading hold gyro is deactivated, with the switch in one position, and vice versa. It's a pain in the butt but here it goes:

1) Do steps 1-3 above
2) Under Electronics, create a new gyro, re-name it "rate gyro"
3) Set "Rate Gyro as follows:
Axis = Yaw
Control Input = Rx Channel 4
Heading Hold Mix = 0
4) Under Electronics, create three servo mixers. Call them Servo Mixer A, Servo Mixer B, Servo Mixer C.

Ok, here's the scheme. We are going to use servo mixer A to turn on or off the heading hold gyro depending on the position of switch 7. Servo Mixer B will turn on or off the rate gyro. Servo Mixer C mixes servo mixers A and B, and then we will use servo mixer C to create the input to the tail rotor servo.

5) Set servo mixer A like this:
Input 1 = Rx Ch 7
Reverse = Yes
Input 2 = Heading Hold Gyro
Reverse = No
Logic = multiply

6 Set servo mixer B like this:
Input 1 = Rx Ch 7
Reverse = No
Input 2 = Rate Gyro
Reverse = No
Logic = multiply

7) Set mixer C like this:
Input 1 = Servo Mixer A
Reverse = No
Input 2 = Servo Mixer B
Reverse = No
Logic = Add

8) Ok now all we need to do is tell the rudder servo to use mixer C as the input:
Tail Rotor Servo -> Input for this servo = Servo Mixer C

There ya go. Enjoy

-Dave

You are amazing... Thanks so much for taking the time to post this in this much detail!
 
hornet dave said:
Opjose-

Yes, but does this actually work for you? It doesnt work on mine with 4.5.032, the gyro stays in heading hold mode regardless of the gain input.

Yes it works, but you've probably missed something that is still keeping the gyro in HH.

Check the input and output values of the gyro in the editor as you move the switches and sticks... this tends to clue you into what you are doing wrong.
 
To be honest I don't know what's wrong. This worked just fine in the earlier version when I created the gyro stabilized heli but now it doesn't. Go figure. The gain input toggles between -100 and 100 but the gyro stays in heading hold mode regardless. I'll play with it some more and see what I come up with.
 
Back
Top