Page 2 of 3

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 8:13 pm
by Rob Thomson
I will try do the mod tomorrow - if I have time!

Can you send me an svn tree / patch as in use the sky board.


Sent from my GT-I9300 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 9:05 pm
by KanishkaRC
Hi rob..
Actually nothing is modified other than the P3 string just to make the change clear..

line 214 en.h in translations.
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 ""3P\0 "

the idea is, as the calibratedStick array holds the pot values it should be working without any modifications as it outputs -1024 0 and +1024 when calibrated with the 3 pos switches.

This is just as it seems to me but may be I am totally wrong.
But still I think it should work.
Thanks

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 9:23 pm
by bertrand35
Right.

It seems to me that this issue will be easily solved!

http://code.google.com/p/open9x/issues/detail?id=166

Just some #ifdef to add. I will try to get rid of it tomorrow.

Bertrand.

PS: For the string, "3P" or "3P2"?

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 9:39 pm
by Rob Thomson
Working on that logic....

Should 3POS be.. 3P1?

Sent from my GT-I9300 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 9:41 pm
by Rob Thomson
Actually... Which pot needs to be swapped out?

Top left?
Top right?
Front left?

Sent from my GT-I9300 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 9:58 pm
by KanishkaRC
Rob Thomson wrote:Actually... Which pot needs to be swapped out?

Top left?
Top right?
Front left?

Sent from my GT-I9300 using Tapatalk 2
hi rob..
actually you can replace any pot you like and change the string accordingly..
ex: if you change pot 1
#define TR_POTS_VSRCRAW "3P\0 ""P2\0 ""P3\0 "
I just put 3P here as the strings are fixed width non-null terminated once. anyway we can change it as we want, later once we got it clarified.

as bertrand also said, if its working its just a matter of changing the strings as we want and that can be done with simple compilation option..
ex : 3POS= P13POS ,P23POS ,P33POS

Thanks for the interest.

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 10:12 pm
by Rob Thomson
It will be better to not resort to code change to get the feature.

Best option would be that If you enable 3pos, a system preference allows you to set the pot that is swapped.

Either that, or a standard pot for the mod.

This would be simplest for end users who want to change their systems.

Sent from my Nexus 7 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 10:13 pm
by Rob Thomson
Or... Does the companion compile option set the pot to use?

Think I just got what you meant!

Sent from my Nexus 7 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 10:20 pm
by bertrand35
Absolutely. I don't like to add system options (which use flash, EEPROM and RAM) for hardware changes. At least on stock board.
Agree about 3P1 and 3P2 of course!

Bertrand.

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 10:26 pm
by KanishkaRC
Rob Thomson wrote:Or... Does the companion compile option set the pot to use?

Think I just got what you meant!

Sent from my Nexus 7 using Tapatalk 2
yeah.. thats what i mean. at the compilation time we can choose which pot.
sorry for my bad English as I am not a native speaker.. :oops:
bertrand35 wrote: PS: For the string, "3P" or "3P2"?
I just used only 3P in the above example as it will not change the string length and disturb the other string segments.

Re: Extra 3 position switch

Posted: Mon Jan 21, 2013 10:40 pm
by bertrand35
KanishkaRC wrote: I just used only 3P in the above example as it will not change the string length and disturb the other string segments.
In fact we are allowed 4 chars there (and that 4 chars are mandatory).

Bertrand.

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 12:17 am
by KanishkaRC
Hi I updated the patches in the
http://code.google.com/p/open9x/issues/detail?id=166

I checked with all translations and its working fine.
New make file is also attached and option to select the pot is given
3POS= POT1, POT2, POT3

Now 3 position switches are named as 3PO1 and 3PO2. hope its ok.

Thanks

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 4:17 am
by Rob Thomson
Sweet. Will do my best to pull my radio open today and test.

Guess the next question is...

Can we make this do a virtual ID3 ID4 ID5?

Sent from my Nexus 7 using Tapatalk 2

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 4:43 am
by KanishkaRC
Yes, I think its possible to do. only thing is its gonna change the Keys enumeration so need to keep an eye on other associated functions with them.
Bertrand would be in a better position to answer it with more insight I guess.
May be at first we can make sure this works and hopefully we can finish virtual switches too as needed.

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 6:18 am
by bertrand35
Right. It's very easy to do. The problem will be the compatibility with other EEPROMs and companion9x. Because if ID3 / ID4 / ID5 are inserted, I would see them near ID0 / ID1 / ID2 ...

Bertrand.

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 6:58 am
by Rob Thomson
Guess the hard part is how this is worked out... the code would have to take into account variations between resistors values.

This mod will really make the 9X perfect for me. I never use the pots, but always feel I need another 3POS!

Rob

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 3:52 pm
by Rob Thomson
Well.. on the plus side this works for a 3POS system perfectly!

I did my mod using two 2.7k resistors. (had them)

The actual P3 in my case is just being used as the source. This works exactly as expected.

Rob

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 6:04 pm
by KanishkaRC
Thanks all,
Glad we could do this to make it useful for everybody. :P

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 6:08 pm
by Rob Thomson
Do just a case now of waiting for the extra id values and companion to catch up.

Bertrand... Do you need me to add a task to the list?

Sent from my GT-I9300 using Tapatalk 2

Re: Extra 3 position switch

Posted: Tue Jan 22, 2013 6:13 pm
by bertrand35
The biggest part of the work will be inside companion9x. I will see with Romolo if he has time to help me on that. No need of a new issue, it's already opened.

Bertrand.

Re: Extra 3 position switch

Posted: Thu Feb 07, 2013 6:38 am
by Rob Thomson
I have put up an example template

viewtopic.php?f=38&t=2753&p=38677#p38677

that uses an extra 3POS switch on P3 using custom switches. This setup will be much simpler when the features in this thread are added. But for now.. this is how to do it!

Re: Extra 3 position switch

Posted: Thu Feb 07, 2013 10:01 pm
by Helle
hy,

here the complete example


Helle

Re: Extra 3 position switch

Posted: Sun Feb 24, 2013 10:32 pm
by LTMNO
Very cool. Thanks for posting.

Re: Extra 3 position switch

Posted: Sun May 26, 2013 9:54 pm
by ethebee
Hi,

This is a great idea and I am thinking of up-grading my transmitter to add a 3 position switch in place of one of the pots. Already have the switch and resistors.

Has Companion9x been updated to reflect the ideas behind this thread? If so how do I define the switches/pot in question?

Thanks

Eric

Re: Extra 3 position switch

Posted: Sun May 26, 2013 11:50 pm
by pmackenzie
Even if they have not added anything specific for this you can always use the custom switches.

Re: Extra 3 position switch

Posted: Mon May 27, 2013 9:48 am
by jhsa
In openTX just select the pot as source and use a curve to adjust endpoints and middle point

Joao

Re: Extra 3 position switch

Posted: Mon May 27, 2013 10:42 am
by Rob Thomson
Unless of course you want the custom switch as a trigger to a flight phase :)

Sent from my GT-I9300 using Tapatalk 2

Re: Extra 3 position switch

Posted: Mon May 27, 2013 10:43 am
by pmackenzie
That would only let you control a servo with the new switch, not do all the things you can regularly do with one.(D/R, flight modes,etc)

Re: Extra 3 position switch

Posted: Mon May 27, 2013 11:48 am
by jhsa
true..

Re: Extra 3 position switch

Posted: Tue May 28, 2013 10:55 am
by ethebee
Thanks Guys for all your suggestions!

Rob is right - looking at using the switch to provide additional Flight Modes so -

pmackenzie suggestion is what I need to do!

Cheers

Eric