enable/disable expo for copied channels?

Help with any software/desktop related issues. e.g. companion9x, eePe, etc
Post Reply
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

enable/disable expo for copied channels?

Post by csurf »

I'm playing with setting up pan/tilt control of an FPV gimbal via a switch and the AIL/ELE stick. I've got mixes setup to copy the AIL and ELE channel values over to the output channels for the gimbal pan & tilt servos.

I have around 30% expo on the AIL and ELE channels, which I'm assuming gets transferred over to the copied channel outputs, correct? If so, would there be a way to disable the expo on the AIL and ELE channels from passing through to the copied channels?

And, another side question, is there a way to setup a separate expo for a channel?

example:
let's say I have 30% expo on my AIL channel, channel #1.
The pan servo channel, channel #9, gets its input from CH1, and I want 60% expo on the pan servo's channel output.
Would it be possible to over-ride the expo on a copied channel? If not, how hard would it be to implement this as a possible future feature request? It seems as though my version of er9x only allows for expo control on the four primary channels...

User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: enable/disable expo for copied channels?

Post by KAL »

First of all it would be helpful to tell us which TX and firmware you use.
(Sorry, saw too late that u use er9x ;) )

EXPO/DR is related to the sticks; just before the mixer.
I would skip the global EXPO/DR.
In ersky9x and er9x e.g. you can either select a curve or differential in every single line of the mixertable (don't know since which release).
In your case u might use a curve you can set as you need.
diff.jpg
Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I'm not sure why you are using CH1 as the input to CH9, rather than the AIL stick directly.
What I can do (probably), is add an option to disable the use of EXPO and DR on a particular mix, so you would use the RAW stick value.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

MikeB wrote:I'm not sure why you are using CH1 as the input to CH9, rather than the AIL stick directly.
What I can do (probably), is add an option to disable the use of EXPO and DR on a particular mix, so you would use the RAW stick value.

Mike.
oops, my mistake... that's what I should of mentioned; I'm using the named channel values "AIL" and "ELE" as my sources for channels 9&10. What's the difference between referencing AIL,ELE,THR,RUD vs. the assigned channels? Does one contain raw stick values while the other contains the final mix? Do both contain the applied expo settings from the EXPO/DR menu screen? I'm a little confused on the order of precedence going on here... :?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: enable/disable expo for copied channels?

Post by jhsa »

Expo and DR are applied to the sticks, before the mixer.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I've just added an option in the mixes of er9x to ignore any expo or dual rates that is set. Test version posted here: viewtopic.php?f=5&t=4598.
I made space by removing a redundant option of FmodeTrim. This was put in a long time ago and since then flight modes have been added.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

KAL wrote:First of all it would be helpful to tell us which TX and firmware you use.
(Sorry, saw too late that u use er9x ;) )

EXPO/DR is related to the sticks; just before the mixer.
I would skip the global EXPO/DR.
In ersky9x and er9x e.g. you can either select a curve or differential in every single line of the mixertable (don't know since which release).
In your case u might use a curve you can set as you need.
diff.jpg
Klaus
thanks for the feedback...
where can I learn more about differential mixing? is that basically an exponential mix? If not, how would I do it via a curve?
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

MikeB wrote:I've just added an option in the mixes of er9x to ignore any expo or dual rates that is set. Test version posted here: viewtopic.php?f=5&t=4598.
I made space by removing a redundant option of FmodeTrim. This was put in a long time ago and since then flight modes have been added.

Mike.
thanks Mike, have just flashed & will test...
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

When editing a mix, when you get "Curve" highlighted, just press MENU and it switches to "Diff". You then just set the amount of differential you require.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: enable/disable expo for copied channels?

Post by KAL »

csurf wrote:... differential mixing? is that basically an exponential mix? ...
Differential has nothing to do with expo. It reduces the throw of a mix to one side.
Used for example for ailerons, where the upward deflection often should be greater than downward.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

Ok, so is there a way to setup a separate expo curve from the global expo settings? I tried messing eith thr custom curves, but they only allow for rough, four-point linear "curves". Would it require too many resources to allow for a real expo function for the custom curves?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: enable/disable expo for copied channels?

Post by jhsa »

In er9x you have 5 point and 9 point curves. where did you get the 4 point from?? ;) :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I'd guess 4 points either side of 0. The biggest problem is finding the space in the mix data structure to store the parameter(s) needed for an expo function, I'll give it some thought!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: enable/disable expo for copied channels?

Post by jhsa »

Mike,what about more points in the curves? Possible on all boards? only on some?

Thanks

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

Ok, the answer to the question "Would it require too many resources to allow for a real expo function for the custom curves?" is 108 bytes of flash!
I'd just saved 62 bytes anyway!
I'm also taking out the FrSky DJT/DHT module alarms. These were useful when they were put in as they were the only way of getting any telemetry alarms then, but now we have other ways of handling telemetry alarms they really are not needed and may even be confusing. This saves over 600 bytes of flash.

So, what I've just done is to allow "Expo" to be selected as well as "Curve" and "Diff". Selecting "Expo" allows you to select a value from 0 to 100 for the expo. Only positive expo currently, which is less sensitive around 0 and more sensitive at the extremes.

I've also removed the hardcoded:
Voltage threshold alarm for individual cells,
Mah_limit for flight pack capacity
Altitude alarm
and also the "FmodeTrim" option

The three alarms may all be set using custom switches and audio/voice alarms. FmodeTrim is redundant as we have Flight Modes now. The bit in the mix structure the FmodeTrim used, is now used to disable all expo and dual rates that might be configured for a stick.

I've only checked the M64 version so far, and should do a bit more testing. I need to check the '128 version as well.
The removal of FmodeTrim and the addition of an expo curve will go into ersky9x shortly.
I'll hope to post test versions of er9x tomorrow.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

jhsa wrote:In er9x you have 5 point and 9 point curves. where did you get the 4 point from?? ;) :)

João
MikeB wrote:I'd guess 4 points either side of 0. The biggest problem is finding the space in the mix data structure to store the parameter(s) needed for an expo function, I'll give it some thought!

Mike.
yeah, sorry, my bad, that's what I meant... 4 points either side of zero, total of 9 points.
MikeB wrote: ...
So, what I've just done is to allow "Expo" to be selected as well as "Curve" and "Diff". Selecting "Expo" allows you to select a value from 0 to 100 for the expo. Only positive expo currently, which is less sensitive around 0 and more sensitive at the extremes.
...
Mike.
wow, that sounds pretty cool.
thinking out loud, but would it be possible and/or make sense to just define expo/DR settings as separate, global entities (in the same way as curves) that can be applied to one or multiple channels/mixes?

example:
Let's say that I'm applying a 30% expo/100% weight curve on both my AIL and ELE (ch1&ch2)...

So, I'm thinking of something where I can define a single, global "30% expo /100% weight" curve that can then be applied to both those channels, instead of having to define two separate expo curves for each channel & having to dedicate resources for the two, redundant curves.

And, if I should require that same curve for another channel ( or even for another model if done globally?), I can just link that channel to the saved curve... Dunno if that could even work, just seems like logically it would work & make sense to do it that way. But, again, not sure if it's even feasible at all.

FYI, in case it makes a diff, I'm running the 128 chip.

EDIT:
brings another question to mind... Is there a reason why there's a predefined number of curves vs. defining & storing them on the fly in the same way as models can be created (subject to resource availability) & eliminated in order to free up resources? I don't personally use or need all of those curves.

Same goes for switches... would it be possible to create switches on an as-needed basis and save all of those resources if none are created?
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: enable/disable expo for copied channels?

Post by Kilrah »

csurf wrote: Same goes for switches... would it be possible to create switches on an as-needed basis and save all of those resources if none are created?
That would make the selection list handling highly complex as its positions would not be tied to a known element anymore, care would need to be taken not to overflow it, etc. Unused items don't use any EEPROM anyway.
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I have posted test versions, with this in, on the er9x test versions thread.
Some compression is used when saving model files to EEPROM. In particular, sequences of zeroes are stored as a code byte and a count (total 2 bytes). We have, for example, 8 9-point curves that use 72 bytes in total. If none of these are used, then these 72 bytes occupy just 1 byte in the EEPROM (a flag bit and a count of up to 127). Since the 8 5-point curves (40 bytes) are next to these, if no curves are used then all 112 bytes use just 1 byte of EEPROM.
The complete model structure is currently over 960 bytes long, so if you use everything, you will probably only get 2 models stored on a M64 board!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

Hey mike,
A while back, I installed the dev/test version that you mentioned above on a separate test radio.
er9x-r814
V1.118-Mike
21.10.2014
16:22:30
FRSKY 128

I was going to use this setup in conjunction with some progressive mixes that you had recommended for controlling a pan-tilt gimbal via the TRN switch and the AIL/ELE sticks.

Today, I finally had some time to revisit this project, only to find that the mixes that you recommended aren't functioning properly; doing something such as the following doesn't work as expected:
CH1:
+ 100 CH1 ---- //to fix channel/make any previous value 'stick'
R 100 AIL !TRN //to enable AIL stick input when TRN toggle switch is in 'off' state

I was expecting the above mix to allow AIL input when the TRN switch is toggled off, and make the channel value stick when the switch is toggled on. However, what's actually happening is that the channel value will go to zero when the TRN switch is enabled, so it appears that the first 'auto/redundant' mix that "sets the channel value to itself" isn't working.

I tried a few different things in order to try to get it to work, including adjusting the mixing order, but nothing seems to work. What am I missing here? Is there something to do with the mixing algorithm that was possibly broken in the test version?

needless to say, I can't get any of the other progressive/PTZ gimbal mixing stuff done if the 'redundant' mixes don't work. Any ideas on how to fix this?
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I'll investigate.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: enable/disable expo for copied channels?

Post by csurf »

Thanks Mike,
FYI, I ended up loading the latest version available for the 128 via eePe, and I'm seeing the same mixing behavior in that version. I tried implementing the same simple mix that I posted above, and it didn't work; the channel values would go to zero whenever the switched 'replace' mix was disabled via the toggle switch, instead of allowing the redundant source mix to stick.
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: enable/disable expo for copied channels?

Post by MikeB »

I've got the fix, I had changed the way some things worked in the mixer to save some RAM. I got this out by 1, to do with "has the channel source in the mix already been calculated?".

A work around is:
CH1: +100% CH2
R +100% AIL Switch(!TRN)
CH2: +100% CH1

I'll post a test version with this fixed, but I have been doing a major change to make the "Model Index" menu work fully (like the Radio Index" menu.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “Software”