RFC vSwitches: virtual switches for mixer

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
29 Jan 2013 10:08 - 29 Jan 2013 10:09 #5708 by rbe2012
I am working on a method to use virtual switches as they are discussed in another thread ( Independent trims for flight modes ).
I make my development with Devo8 and the corresponding emulator, have not transferred it to the other tx. Now I may be a little late because Devo12 will change many things.
I have to mention that my english is not the best and I tend to tell things slightly too complicated. Please ask if something remains unclear.

This is what I have implemented yet:
  • a page for defining six virtual switches
  • - renaming is possible
  • - a hardware switch can be assigned to the vSwitch
  • - a logical operator can be defined (and, or, eor)
  • - in this case a second hardware switch can be assigned
  • use these virtual switches like the real ones in every mixer
  • extended emulator windows to show the vSwitches
It looks like this:

They will be shown like this (the given name still not used here):


Until now I have made the configuration of vSwitches as a part of the model config, but I am not sure if this would be the best place.

Please, I would like to hear what others think about these vSwitches:
1) Are they in general useful or nonsense?
2) Where should they be placed?
2a) In model config (that means model specific)
2b) In tx config (that means one for all)
2c) In tx config, but separate configs for helis and planes (means one for every model type, if there will be more sometime)
3) Are the logical operations useful? (I thought so because I can achieve more combinations with two three-way-switches: 3x3=9)
4) How many vSwitches should exist? (implemented yet 6, prepared for 8 )
5) Should the vSwitches be independent or should there be a priority to evaluate the resulting "flight state" (what I mean: if they will be used for flight states only one can be active at one time (from a logical view). So every state gets a name and with a priority it can be decided which is the only active (and the rest may be ignored or set to off or so))
6) Should the "active vSwitch" name be shown somewhere on the main page (this could be useful when it is used to indicate a flight state)? (maybe more difficult on other tx)
6a) If yes, which should be shown? They can be active independent from each other.
6b) If yes, should they all be shown as icons like the toggles, at different positions if independent (or at one position if representing "flight states")?

I would like to make it round before I post the changes in the source code. A few work is still to be done (like saving / restoring the values to ini-files (I know how to do), showing the given names in the mixer's switch field).
My development is based on an earlier commit (be96db7, 1/10/2013), so it could be a challenge to integrate it in the actual sources, but I'll do my best...
Attachments:
Last edit: 29 Jan 2013 10:09 by rbe2012.

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 11:02 #5710 by FDR
It is awesome!
I think they could be useful in either way, however all the possible answers would have compromises.

Since your virtual switches could be named, they meaning is unique, so they can't have a "default" assignment, neither they could be easily mapped between model specific and tx specific values, so I think they have to be defined in the model config.
The counter-example would be fixed name and function virtual switches, which could be defined on the tx level, but could be overridden in the model config, and even could have default assignements if neither the tx nor the model defines it. It could be shared between model configs and especially templates more easily. For example if there was a fixed virtual switch assignment for the throttle hold, say "TH", then one could assign the RUD_DR to it while somebody else the !FMOD0, but the tx could have a default for it. It would be a more limited solution, but would allow the templates and configs to be more generic.

The logical operation between two switches is nice. I would even be happy with one definable switch state.
May be we could use a virtual channel with complex mixer to do the calculations? All we would need to be able to do that is some binary mux functions, like and, or, xor...

So my answers so far:
1) Definitely useful;
2a) if they renamable;
3) yes, but I suggest to consider using a virtual channel;
4) I guess, there will always be somebody, who will miss an other one, but the 6-8 sounds reasonable;
5) they must have a priority, because you cannot easily prevent the user to define them overlapping each other. (Another argument on the fixed name/function switches, which you know do belong together and can presume some priority among them);
6) I don't know a definite answer for this one.
How could you make them dependent or grouped at all?

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
29 Jan 2013 11:19 #5713 by rbe2012
Replied by rbe2012 on topic RFC vSwitches: virtual switches for mixer
FDR,
thank you for your instant feedback. I need more time for mine and will reply at the evening (we have noon here).
(also for the ToggleIcons)

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 11:41 - 29 Jan 2013 11:43 #5715 by Hexperience
Replied by Hexperience on topic RFC vSwitches: virtual switches for mixer
On my cell phone so havent read the complete post yet but PB and i were talking about this in the deviation vs er9x thread.

I would like to see > and < operators as well....

Look into er9x custom switches to see what i mean.

Great work!!! :cheer:

There are 10 types of people in this world. Those that understand binary and those that don't.
Last edit: 29 Jan 2013 11:43 by Hexperience.

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 11:41 #5716 by FDR
To think it further, the use of virtual switches for the calculations would give the option to assign "analogue" channel values too, not just the binary switches...

An other thought: we could have both a few fixed function/name assignments (like TH, FM0, FM1, FM2, FM3) and custom named ones...

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 19:01 #5735 by PhracturedBlue
Replied by PhracturedBlue on topic RFC vSwitches: virtual switches for mixer
I haven't given it enough thought yet, but:
I think there should be pre-defined (even if not assigned) virtual switches supporting the super-set of all Deviation transmitters.

for instance, on a devo7e, you would get:
AIL_DR0
AIL_DR1
AIL_DR2
ELE_DR0
ELE_DR1
ELE_DR2
RUD_DR0
RUD_DR1
RUD_DR2
TRN0
TRN1
GEAR0
GEAR1
MIX0
MIX1
MIX2
FMODE2

on a Devo12 you would only get
DR0
DR1

That basically solves the issue of how to transfer a model made for a different tx.
you can then assign those switches (or not) as you desire.

I like additionally having a small number (6 or so) of nameable switches (cannot be named to any reserved name)

I don't like the idea of priority. each switch should always be able to evaluate to a number. If one switch depends on another they should be automatically ordered (as the mixers are today).

I like the idea of them being fully analog. It is a neat idea (and would enable support for AUX1-6) but it will complicate implementation, and I'm not really sure what the interface would look like.

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 20:13 #5744 by FDR

PhracturedBlue wrote: I like the idea of them being fully analog. It is a neat idea (and would enable support for AUX1-6) but it will complicate implementation, and I'm not really sure what the interface would look like.


One possible solution would be if you could simply assign one (optionally invertable) switch/channel/stick, just like the source of a mixer.
If you want it to depend on more sources, then use a virtual channel.
The only thing missing for that is to be able to configure logical mux functions between the complex pages.

Since all analogue channels can behave like boolean values if you use them as a switch (they are true above zero), you can even use them in boolean operations. You can move their treshold value too with the offset...

Please Log in or Create an account to join the conversation.

More
29 Jan 2013 20:23 #5745 by Hexperience
Replied by Hexperience on topic RFC vSwitches: virtual switches for mixer
Ok, so I think we are all talking about different things in a way.

- V switches used to store settings for flight modes.

- V switches used to make configs compatible across the TX's

- V switches used to store values as "inputs" and compare them to other values and inputs. (the er9x custom switch method).

I think it might be useful to name these in such a way as to know what we are talking about rather than just virtual switches.

Perhaps, F switches for flight switches, V switches for the assignable switches regarding model configs across TX's, and C switches for Custom switches that can "do math" and store values.

I don't use flight modes in that way. The mixer and the fmode switch are enough for me on that topic. But I certainly understand some folks want that kind of thing for lots of good reasons.

I do use the Custom switches in er9x and find them to be really powerful when building complex mixes.

rbe2012's work crosses over a bit into all 3 of those catagories, but may not completely cover any one of the 3 catagories.

I hope I'm making some sense here. I think it might be too easy for the term vSwitch to get confused and cause issues simply because everyone is using the same term for different things.

For example I can say that fSwitches are not important to me personally, but I would like to see cSwitches be able to do > and < evaluations.

??? ....Or am I an idiot? Which has been known to happen.

There are 10 types of people in this world. Those that understand binary and those that don't.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar Topic Author
  • Offline
  • So much to do, so little time...
More
30 Jan 2013 08:10 #5770 by rbe2012
Replied by rbe2012 on topic RFC vSwitches: virtual switches for mixer
Thanks, guys, for your feedback. It is really great to see the common interest to make things better and I don't feel so tired anymore after some nights of coding...

I try to sort the postings:
Hex proposed to divide "my vSwitches" in three different categories. For me it seems to be a good idea to seperate these things and he is right, I don't cover one of them completely (at the moment...).
I will use the full names (flight switch, virtual switch and custom switch (and hardware switch or real switch?)) in the future to avoid mixing up.

Virtual switches:
I think it would not be so hard (at least for Devo8 where my experiences are) to realize a mapping between PB's list of virtual switches for 7E and the real switches in the tx (if we define the relationships). I had to implement such a method what can be used for this without too much effort. For a 1:1-mapping maybe the existing method for channel mapping may be sufficient. I will look into this.

Flight switches:
When using my vSwitch-approach for flight modes (what it was influenced by) you simply have new possibilities in abstracting the switches used in the mixers from the real switches (and renaming can make this more comfortable). This might not be enough to be complete as the discussion about independent trims has shown. Maybe for this a new approach would be better, like storing more than one more or less complete config and switch between these.

Custom switches:
I have read the er9x manual when I started to interest in deViation, what was still before 1.0 and quite a lot has happened since then. So I have to read it again (maybe with more success; it was hard the first time...). But I really like the points outlined by FDR and Hex. It would give us a still higher grade of freedom (although I can not see a benefit/practical use now for me personally, but I am still far away from an experienced flyer and I have to believe you (and I do)). Let me go a little deeper in this aspect the next days.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum