Meaning of switch ONE and !ONE under Custom Functions

Post Reply
User avatar
Infinity
Posts: 82
Joined: Fri May 10, 2013 6:50 am
Country: -

Meaning of switch ONE and !ONE under Custom Functions

Post by Infinity »

Just detected the switches ONE and !ONE under the switch selection ring on the Custom Functions tab and do wonder now what's the meaning of them and what are typical use cases for that.
Any feedback on this is highly appreciated as I couldn't found any describtion of them by searching this forum nor by asking Dr. Google.
Thanks!
meaning of one switch.png

User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Rob Thomson »

The Exclamation is a mathematical operator.

It means NOT or REVERSE.

So.. NOT this switch.
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
Infinity
Posts: 82
Joined: Fri May 10, 2013 6:50 am
Country: -

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Infinity »

Maybe I wasn't clear enough so let's give it a new try. !=negotiation is clear, but what kind of switch is ONE and what can I do with that?
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Kilrah »

ONE is triggered just once on model load.

Sent via mobile
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by jhsa »

Kilrah wrote:ONE is triggered just once on model load.
If that is the case then !ONE is a complete waste of space ;) because it is automatically set when the model is loaded anyway and therefore not needed :) or am I missing something?? :P

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
Infinity
Posts: 82
Joined: Fri May 10, 2013 6:50 am
Country: -

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Infinity »

Sorry, but that triggers my next question: "!ONE means <triggers continiously after model load>?" If this is the case (I have some doubt but no better negotiation for triggers just once), what is the difference between !ONE and ON?
I assume that you or one of the other developers had some typically use cases (scenarios) in their mind for !ONE and ONE. Can you tell me more about this?
If you know a web page which explains the background story, please feel free to reply the link instead of rewriting it.
Thanks!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by jhsa »

I use ONE for the voice to tell the model name everytime I load a model.. For example..
Custom functions:

One playtrack 151 --

This will play voice file number 151 when the model is loaded, being it when changing models or when turning the radio on with that model selected..

ONE if I'm not mistaken, will turn on only once for a period of time and then turn off again.. ON will be always on as the name says.. so whatever feature you are programming will be always active..

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
Infinity
Posts: 82
Joined: Fri May 10, 2013 6:50 am
Country: -

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Infinity »

Thanks Joao, makes perfect sense and a very good use case for ONE.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by jhsa »

I just thought of another possibility also using ONE and voice..
It would allow us, in case we have so many aircraft that we forget about some tricks, the voice to give a short description about that aircraft..
Basically the same as for the name.. I'm sure that if we keep thinking we will find a few more possibilities ;)

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
rdeanchurch
Posts: 750
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by rdeanchurch »

Infinity wrote:Sorry, but that triggers my next question: "!ONE means <triggers continiously after model load>?" If this is the case (I have some doubt but no better negotiation for triggers just once), what is the difference between !ONE and ON?
I assume that you or one of the other developers had some typically use cases (scenarios) in their mind for !ONE and ONE. Can you tell me more about this?
If you know a web page which explains the background story, please feel free to reply the link instead of rewriting it.
Thanks!
The use of ONE is clear to me now.
But the !ONE is still obscure.

Does anyone have an example with explanation they could post please.
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Kilrah »

I don't think !ONE makes much sense, but the current menu system that still comes from the 9x and its severe memory restrictions does not allow skipping list items. So the "left", inverted list has to be the same as the "normal" one.
For example on the Taranis there are duplicate switches too (the 2 position-ones), !SF↓ is useless as it is the same as SF↑.
User avatar
Infinity
Posts: 82
Joined: Fri May 10, 2013 6:50 am
Country: -

Re: Meaning of switch ONE and !ONE under Custom Functions

Post by Infinity »

Thanks Kilrah, that makes perfect sense from programming point of view, especially when you have to deal with memory limitations.
It's always great to get a good answer, although it may contain unexpected content, as you will have learned more anyway out of this.

Post Reply

Return to “openTx for FrSky radios”