including custom-switch support in Deviation

More
22 Jan 2014 09:17 - 22 Jan 2014 09:19 #18907 by Shanman3us
Replied by Shanman3us on topic including custom-switch support in Deviation
@SeByDocKy

The new format is as follows:

2X2 = two 2 position switches
3X1 = one 3 position switch
3X2 = two 3 position switches

The above is based on message #18891 by PhracturedBlue above...

Shanman3us
Last edit: 22 Jan 2014 09:19 by Shanman3us.

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

More
22 Jan 2014 09:28 #18908 by robca
I plan to create a tutorial of the 2x3 switches mod as soon as I have a moment to collect all the pictures/info I have

meanwhile, here is some more info www.rcgroups.com/forums/showpost.php?p=27267888&postcount=551 on the 3-way mod

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

More
22 Jan 2014 09:32 #18909 by SeByDocKy
Replied by SeByDocKy on topic including custom-switch support in Deviation
Thanks Shanman and robca.

I guess the best option is to perform the 3x2 mod....

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

More
22 Jan 2014 14:51 #18920 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Devo 8s

PhracturedBlue wrote: Ok, I just checked in new code that will hopefully get your switches working.

Note. there is a big change here.
I have created a new file 'hardware.ini' that contains all of the hardware modifications. the transmitter will not overwrite this file.
You need to move the switch settings and module settings to this file, otherwise they will not work.

There is an example version included, but also note that I changed the name of the switch parameter.
The parameter is now:

extra_switches=3x1
(also allowed are 3x2 and 2x2)


just built it just now, will get tot testing it soon. also the diodes were there as i always planned to go to 2 x 3way, so everything was done in preparation for that, and as it worked with the existing 1 x 3way patch i thought it was expected.

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

More
22 Jan 2014 15:16 - 22 Jan 2014 15:16 #18921 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Devo 8s
i have attached the latest build for the 7e for those wanting to test it :)
Last edit: 22 Jan 2014 15:16 by HappyHarry.

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

More
22 Jan 2014 16:15 - 22 Jan 2014 16:40 #18924 by blackmoon
Replied by blackmoon on topic including custom-switch support in Deviation
What happens with the current denomination of switches in the model file, should Fmode (from the later 1x3way patch from Kaworu) be replaced by "SW A" or "SW B" ?

Thanks.

EDIT: just tested it the 1x3way switch (+diodes) is recognized as SW A, but in position :

0 (all way up, from the stick) SW A0 = -100 SW A1 = -100 SW A2 = 100,

1 (middle) SW A0 = +100 SW A1 = -100 SW A2 = +100,

2 (all way down) SW A0 = +100 SW A1 = -100 SW A2 = -100.

SW A1 never changes value, and value is not consistent with other switches i.e. if position 0 = 100 etc...

I had before, position :

0 Fmode0 = 100 Fmode1 = -100 Fmode2 = -100

And changing accordingly with switch position.
Last edit: 22 Jan 2014 16:40 by blackmoon.

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

More
22 Jan 2014 17:58 #18926 by PhracturedBlue
Replied by PhracturedBlue on topic including custom-switch support in Deviation
Because the switches are extra hardware, and their purpose is not clearly defined, I decided to use the SW_A and SW_B indications instead. that way a model from a modified devo7e will not directly plug into another Tx without ensuring the functionality is the same.

I got the up/down directions backwards. For some reason I was thinking down was 0 and up was 2, but it should be reversed. So I'll fix that.

I see the issue with the 3x1 SW_A1 as well, but I'm a bit confused. I just checked in an update that may help, but I'm not 100% convinced. It really depends on how the switch is installed.

Also, of course IMBack! is right. the diodes are needed even in the 2x2 or 3x1 cases, otherwise they mask the buttons in those rows.

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

More
22 Jan 2014 18:05 - 22 Jan 2014 18:07 #18928 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Deviation
yep i can confirm that the 1 x 3way isn't working correctly,

when looking at the channel monitor

switch pos 0 (up)
SW A0 = -100 SW A1 = -100 SW A2 = +100
switch pos 1 (middle)
SW A0 = +100 SW A1 = -100 SW A2 = +100
switch pos 2 (down)
SW A0 = +100 SW A1 = -100 SW A2 = -100

which is the reverse of what it was before with the 3 way patch, but this is easly changed by turning the switch.

but although it shows correctly in the channel monitor it isn't working correctly in operation, if i set my fmode to be controlled by SW A it is only reacting to two positions not three, as in if i sent my throttle curves to this

normal = -100 for all
idle up 1 = 0 for all
idle up 2 = +100 for all

and flick through the switch positions

position 0 gives me +100 (should be -100)
position 1 gives me +100 (should be 0)
position 2 gives me -100 (should be +100)

as i said the reversing is easily fixed but not reading the change to position 1 isn't correct.

also in the timers page you can't change the switch for the timer trigger, it is stuck on channel 3, no matter what type of timer you choose.

pb do you want to continue to receive reports here or will i post bugs on bb?


//edit
sorry pb, you posted as i was writing this post, i'll go build the new commit and report back
Last edit: 22 Jan 2014 18:07 by HappyHarry.

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

More
22 Jan 2014 18:07 #18930 by PhracturedBlue
Replied by PhracturedBlue on topic including custom-switch support in Deviation
please test the code I checked in 20mins ago and report back.

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

More
22 Jan 2014 18:17 #18932 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Deviation
that has fixed the reading of the three positions, though it is still in reverse lol :D

the problem with timer channel selection still exists

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

More
22 Jan 2014 18:29 #18933 by PhracturedBlue
Replied by PhracturedBlue on topic including custom-switch support in Deviation
try your 3x1 now. hopefully up is 0 and down is 2 now.

The 'Ch3' thing on the timer is on purpose. when you use the standard mixer, you cannot control the switch used for the timers. I believe it has always been like that. I don't recall why...I didn't write that code. If you use the advanced mixer, you can select the switch.

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

More
22 Jan 2014 18:49 - 22 Jan 2014 18:49 #18934 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Deviation
that's fixed it pb, many thanks for your quick responses, and man i wish i had half your coding skills 8)

re the switch for the timers in the standard mixer, you used to be able to switch between the current throttle channel (ch1 or ch3 depending on protocol) or 'none' so you could turn the timers off, you cant change them to 'none' anymore
Last edit: 22 Jan 2014 18:49 by HappyHarry.

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

More
22 Jan 2014 19:46 #18937 by IMback!
Replied by IMback! on topic including custom-switch support in Deviation
Just a recomendation: I would love the option to have one extra 2pos switch and one 3pos switch. Also maybe a one for 3 2pos switches.

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

More
22 Jan 2014 20:29 #18938 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Deviation
i think with the advanced GUI a 2 x 3way switch setup could be used to cover all of those options :)

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

More
22 Jan 2014 20:55 - 22 Jan 2014 20:56 #18939 by PhracturedBlue
Replied by PhracturedBlue on topic including custom-switch support in Deviation

HappyHarry wrote: re the switch for the timers in the standard mixer, you used to be able to switch between the current throttle channel (ch1 or ch3 depending on protocol) or 'none' so you could turn the timers off, you cant change them to 'none' anymore

Ahh...yeah that is a bug. I'll work on it

IMback! wrote: Just a recomendation: I would love the option to have one extra 2pos switch and one 3pos switch. Also maybe a one for 3 2pos switches.

Up to 4 wires, it is just a matter of adding a couple lines of code to support. I'm not sure I want to deal with users wiring their switches upside down, or swapping left and right, but the other combinations:
2x2+1x3, 3x2, 4x2, 1x2+1x3 are all easy to add
(each one requires ~6 lines of code). However, I'm not going to code them ahead of time. The problem is making sure you get the polarity right. Like right now, I am quite sure the 2x2 is still broken because noone has tried it. Once someone gives it a shot, it should only take a few minutes to get it working correctly.

Getting a document that clearly shows how to wire the various options would go a long way to making this a more popular option.
Last edit: 22 Jan 2014 20:56 by PhracturedBlue.

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

More
22 Jan 2014 21:21 #18942 by robca
This thread is moving way too fast for me :)

I just finished testing the build Happy Harry shared, and getting ready to start typing my findings, when I discover that not only Happy Harry found the same things I did, it has already been fixed (twice)... I'm useless here :P

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

More
22 Jan 2014 21:21 #18943 by ruzam
Seems to me there are various possible assignments to both the 7E stock switches and the extra switch mods. On man's extra 'gear' switch might be another man's 'RUDD D/R' switch. I think we're all trying to get the same features of a larger transmitter from a lowly 7E, selectively choosing what we can squeeze in, limited by the hardware.

How are the extra switches configured in the bigger Devos? Can the 'extra' 7E switches (or for that matter the stock switches) be mapped to the same menu items?

Porting model.ini files (and documenting them) might be easier if the same switch 'functions' were in common between different transmitters. For example the new hardware.ini file tells the code not only what switches the transmitter has but how they are mapped as well (every transmitter model would have it's own hardware.ini). The 7E switches would be mapped to a very small subset of the larger pool. The Devo12s would, by default, be mapped to every switch (cause it has em). If your transmitter doesn't have that particular switch, the .ini would work as if the switch were set to a default (static) setting (maybe it does that now?). The menus would continue to show 'all' switches (maybe with an * or something to indicate missing switches) and allow entering mixes with the missing switches.

Maybe I'm just talking too much...

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

More
22 Jan 2014 21:26 #18944 by blackmoon
Replied by blackmoon on topic including custom-switch support in Deviation

PhracturedBlue wrote: Getting a document that clearly shows how to wire the various options would go a long way to making this a more popular option.


Agreed, wiring should be standardized to avoid mistakes and headaches.

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

More
22 Jan 2014 21:36 #18945 by kreidler
Replied by kreidler on topic including custom-switch support in Deviation

PhracturedBlue wrote: Like right now, I am quite sure the 2x2 is still broken because noone has tried it. Once someone gives it a shot, it should only take a few minutes to get it working correctly.

I do not have a 7e on hand yet. But if hardware.ini is set to 2x2 with installed 3x1 switch testing should be possible due to same wiring:
SW A0 = -100 SW A1 = +100
SW B0 = -100 SW B1 = +100
While in middle position the same value for SWA and SWB should be present.

Just for my understanding for 2x2 and 3x1 it does not matter if diodes are installed or not. Correct?

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

More
22 Jan 2014 22:14 - 22 Jan 2014 22:19 #18947 by HappyHarry
Replied by HappyHarry on topic including custom-switch support in Deviation

kreidler wrote: I do not have a 7e on hand yet. But if hardware.ini is set to 2x2 with installed 3x1 switch testing should be possible due to same wiring:
SW A0 = -100 SW A1 = +100
SW B0 = -100 SW B1 = +100
While in middle position the same value for SWA and SWB should be present.

Just for my understanding for 2x2 and 3x1 it does not matter if diodes are installed or not. Correct?


this is how i understand it also, and the diodes are required for all of the switch mods

PhracturedBlue wrote: Getting a document that clearly shows how to wire the various options would go a long way to making this a more popular option.


i can certainly take good pics of my 3x1 wiring and again once i hook up the second 3 way switch which will cover the 3x2 wiring, but i believe robca is already working on a howto for the switch mods?

to save people building their own 7e version i have attached a build of the latest commits to this post
Last edit: 22 Jan 2014 22:19 by HappyHarry.

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

Time to create page: 0.161 seconds
Powered by Kunena Forum