Stagility mode vs.toggle displays

More
25 Nov 2014 22:24 #26576 by mwm
While setting up a stailigity mode for my 200SRX, I noticed something annoying: moving the flight mode toggle from the FMODE switch to the channel that controlled the flight mode moved it from a 3-state toggle to a 2-state toggle.

I was thinking about fixing this, but thought I'd check here first.

Anyone have any objections to making toggles based on channels have more than two states? In particular, I have projects in the works that might have as many as 5 states based on the channel value and the miracle of microcontrollers.

Assuming the idea isn't totally objectionable, the question becomes how to deal with toggles with a variable number of states. Ideas include:
  • Just use three, and hope that nobody depends on small values.
  • Use three, but have the code detect the middle one not being set to mean use a >/< 0 toggle instead of the three-state toggle.
  • Have ways to add/remove toggle states in the UI, and do the state determination by division.
  • Add/remove toggles plus the ability to set channel values for each toggle.
  • Complete redesign of toggle UI for variable number of toggles, and probably display code as well.

And some of you probably have better ideas yourself. Please share them!

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
26 Nov 2014 07:47 #26582 by hexfet
Replied by hexfet on topic Stagility mode vs.toggle displays
I don't understand the question. To me a toggle is a 2-way switch, which is consistent with the usage in the deviation manual. And a switch and a channel are two different things. So I can't parse "moving the flight mode toggle from the FMODE switch to the channel that controlled the flight mode".

The complex mixer supports sending multiple output values on a channel based on switch positions. Does that meet your need?

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

More
26 Nov 2014 08:34 #26583 by mwm
Replied by mwm on topic Stagility mode vs.toggle displays
Ah, I see the confusion. I'm using "Toggle" from the Main Page Configuration section (8.7) of the Devation 10 user manual: an object on the main page that shows a box based on a switch setting. See that section of the manual, the next to last object in the list of possible objects. But I'll explain in detail; forgive me if I cover things familiar to you.

Basically, a gui toggle takes a switch value and displays an icon (or nothing) depending on its value. If the value is a switch control, you get to choose one icon for each switch state. So FMODE on my Devo10 or Devo6 gets three possible icons for the three flight modes.

Anywhere you can use a switch in deviation, you can use a channel or analog input. If the value is > 0 (maybe >= 0), the switch is on, otherwise the switch is off. (Conversely, anywhere you have an input channel, you can use a switch, and it gets a value of -100 or 100).

So. the gui toggle using FMODE as an input gets three icons, and that worked great when when that was all that could change the flight mode. Stagility mode uses the cyclic stick position as well as the FMODE switch to control flight modes. So I changed the switch on that toggle from FMODE to the output channel that controls the flight mode - and realized I only had two icons.

I'd like to fix things so that if I'm using a channel with three (or maybe more) output states as the switch for a gui toggle, I can select from three (or more) icons.

I don't think there's any other place where there are three-state switches still exist in deviation. Elsewhere, three-way switches are represented as three two-way switches (i.e. - FMODE0, FMODE1 and FMODE2) and you use those. Which is why I was thinking a redesign might be in order.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
27 Nov 2014 04:34 #26597 by hexfet
Replied by hexfet on topic Stagility mode vs.toggle displays
Thanks, now I see what you mean. It also helps when I look at the correct version of the manual :oops:

The method you proposed in the third bullet makes sense to me. All the user needs to do is set the desired number of states (and assign icons). Displaying the calculated breakpoints would be a help in setting up the flight controller.

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

More
27 Nov 2014 05:43 #26599 by mwm
Replied by mwm on topic Stagility mode vs.toggle displays
I was thinking an approach more in line with the way the rest of Deviation treats 3-way switches and channels when used as switches might be better. It would take more code to create the gui, but would hopefully eliminate some special case code along the way.

For instance, in mixers, you don't get two mixers if you have a 2-way switch and three for a 3-way, you get one for a switch state, and the ability to use inverted switches. So to do a switch, you still set up two mixes, one with switch in one state, and a second with no switch or the switch in the other state if you need it. For a 3-way switch, you use 3 mixes, one for each switch position.

So instead of special casing channels as switches to let the user pick the number of states, every toggle would let the user pick the number of switches - or their inverse. To do the display, the code runs through them in order and displays the icon for the first switch that matches in the toggle box. If none match, the box is left blank.

A lot of the default toggle setups - and many I use - would get simpler. They display an icon if throttle hold is on, or dual rates on some control, or something like that - and nothing if it isn't. so they become a single switch/icon pair.

2 and 3-way switches would look like they do now, with three switches for the toggle, one for each switch position.

To handle my three-state channel, I'd need to use a second virtual channel to create a second switch. The channel proper would be used in it's normal and inverted state for two icons, and then the second channel would do something like source the first channel in an absolute value curve, scalar -33 (or whatever), and then invert it to display the last icon. Probably want it first in the toggle, though. The downside is the user has to set up extra switches, but the upside is the user gets to determine the values for which each icon is displayed.

How does that sound to you?

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
29 Nov 2014 00:17 - 29 Nov 2014 02:19 #26630 by hexfet
Replied by hexfet on topic Stagility mode vs.toggle displays
Sounds reasonable to me, but I don't use the gui toggles much. Suggest creating an enhancement issue on PB's repo to get more discussion.

One concern would be the code size since the 7e already can't fit all the features.
Last edit: 29 Nov 2014 02:19 by hexfet.

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

More
29 Nov 2014 01:15 #26633 by mwm
Replied by mwm on topic Stagility mode vs.toggle displays
Issue created: bitbucket.org/PhracturedBlue/deviation/i...ggle-icon-selections

At this point, I've decided to look into implementing the proposed changes. However, I don't expect to have time for this this year.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
07 Dec 2014 21:24 - 07 Dec 2014 21:30 #26841 by Indigo
Replied by Indigo on topic Stagility mode vs.toggle displays
Would replacing the current 2 state virtual toggle switch with 2,3,4 state versions be the solution?

On/Off
Momentary
2 Toggle
3 Toggle
4 Toggle

Virtual switch converts: trim values <--> switch states.

Would it need to be changed to convert: channel values <--> switch states
Last edit: 07 Dec 2014 21:30 by Indigo.

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

More
07 Dec 2014 21:50 - 07 Dec 2014 21:51 #26842 by mwm
Replied by mwm on topic Stagility mode vs.toggle displays
That would solve my immediate problem, but the proposed solution of making each toggle (by which I mean an icon position on the display) look more like a mixer would be a lot more general. For instance, you could use that to use one toggle for the five flight modes on a Blade 350QX, and I don't believe just changing the 2/3 state toggles to let you select a toggle count would do.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.
Last edit: 07 Dec 2014 21:51 by mwm.

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

More
04 Feb 2015 02:31 #28394 by mwm
Replied by mwm on topic Stagility mode vs.toggle displays
I've got working code for this for the 7e & 10. Well, the emulators.

If you're doing your own builds, you can pull the code from the new_toggles branch of my bitbucket repo . This is a clone of the team deviationTx repo.

I've also added a description of the user interface to the team wik.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum