6 Flight modes on a modded Devo7e with 2x3 Switche

More
22 Aug 2015 13:55 #37141 by AssassinsLament
Replied by AssassinsLament on topic 6 Flight modes on a modded Devo7e with 2x3 Switche
Sorry I replied while you were writing above. Your explanation was great, I'll work with that until I'm stuck again. Thanks for being patient with me.

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

More
22 Aug 2015 16:32 - 22 Aug 2015 16:34 #37143 by AssassinsLament
Replied by AssassinsLament on topic 6 Flight modes on a modded Devo7e with 2x3 Switche
Ok, so thanks to your explanation, I was able to get the SaveTrim working! But the Autotune is turning out to be a bit more complicated.

Here is my current code:
[channel8]
template=complex
[mixer]
src=Ch8
dest=Ch8
scalar=-100
curvetype=fixed
[mixer]
src=Virt7
dest=Ch8
scalar=100
curvetype=fixed
switch=Virt3
[mixer]
src=Virt7
dest=Ch8
scalar=-100
curvetype=fixed
switch=Virt4

[virtchan3]
template=complex
[mixer]
src=Virt3
dest=Virt3
scalar=0

[virtchan4]
template=complex
[mixer]
src=Virt4
dest=Virt4
scalar=0

[virtchan7]
template=complex
[mixer]
src=Virt7
dest=Virt7
scalar=0

[trim5]
src=Virt7
pos=Exit
step=193

[trim7]
src=Virt3
pos=TRIMLV+
step=193
value=-100,0,0

I just pasted the relevant code, but yeah, I probably followed your suggestion wrong. I set the first mixer on channel 8 to fixed because I guess it's defaulting to 0 instead of min. Anyhow, the problem seems to be that the switches in the second/third mixers in channel 8 aren't detecting or maybe they are and I'm not sending the right signal... but once I remove the switch on the second mixer and remove the third mixer totally (just to test if anything happens to channel 8 while pushing EXT), I can get a required signal. So I'm assuming I'm not doing the switch part right.
Last edit: 22 Aug 2015 16:34 by AssassinsLament.

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

More
22 Aug 2015 19:18 #37145 by Richard96816
Replied by Richard96816 on topic 6 Flight modes on a modded Devo7e with 2x3 Switche
Deviation is extremely powerful. Might be cool to have a PC-based tool that would take switch/button truth-tables or something and turn them into .ini file code. To make that power accessible to humans. :-)

Make it possible for more folks to more easily try all manner of command combinations. People would be running around doing unspeakable things with their deviate radios.

:-)

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

More
23 Aug 2015 11:05 #37165 by mwm
I think your AutoTune behavior is going to be a bit more complicated. What you're asking for is two momentary switches, each of which is the and of the Ext button and one of the LH switches - basically the AutoTune switch again, twice. So your virtual channel count is: 5 trim switches EXT, LH+, LH-, and the two for savetrim. Then two more channels, one using EXT and LH+ they way savetrim does on channel 7, and another using EXT and LH- the same way.

Finally, you get channel 8:

mixer1: Src is channel 8, curve is min/max
mixer2: curve is fixed, switch is one autotune momentary, scale is +100
mixer3: curve is fixed, switch is other autotune momentary, scale is -100

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
24 Aug 2015 01:30 - 24 Aug 2015 01:46 #37177 by AssassinsLament
Replied by AssassinsLament on topic 6 Flight modes on a modded Devo7e with 2x3 Switche

mwm wrote: I think your AutoTune behavior is going to be a bit more complicated. What you're asking for is two momentary switches, each of which is the and of the Ext button and one of the LH switches - basically the AutoTune switch again, twice. So your virtual channel count is: 5 trim switches EXT, LH+, LH-, and the two for savetrim. Then two more channels, one using EXT and LH+ they way savetrim does on channel 7, and another using EXT and LH- the same way.

Finally, you get channel 8:

mixer1: Src is channel 8, curve is min/max
mixer2: curve is fixed, switch is one autotune momentary, scale is +100
mixer3: curve is fixed, switch is other autotune momentary, scale is -100


Sorry, I think you just confused me more. Let me clarify where I am at. Right now, the save trim on Ch7 works as I want... And I only have two trims for it... 1) the EXT button 2) LH+ and it's only using two virtual channels LH+ and EXT. Now I'm trying to get Ch8 to turn on with EXT+LV(+) and off with EXT+LV(-). I am assuming that I can reuse the EXT trim for the two LV, correct?

So that gives me:

trims: EXT, LH+, LV+, LV-
virtual channels: EXT (Virt7), LH+ (Virt2), LV+ (Virt3), LV- (Virt4)

Ch8 mixer1 can not be min/max because that gives me an "on" by default. So I have to use fixed with scale -100.
in mixer2, I have what I think you are saying except the switch doesn't seem to be detected when I press EXT+LV(+). if I remove the "switch," the mixer2 is active when I press the EXT button alone and I get an "on." But if I put the switch=Virt3 back in again, it doesn't detect when I press the EXT+LV(+) again. So some how the switch isn't detected?

I suppose mixer3 would be just be a copy of mixer2 except with the virtual channel LV(-), so I'm only working on mixer2 at the moment. Take a look at my code above in post #37143 whenever you have time and see if I've done something wrong.

Thanks!
Last edit: 24 Aug 2015 01:46 by AssassinsLament.

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

More
25 Aug 2015 12:05 #37200 by mwm

AssassinsLament wrote: trims: EXT, LH+, LV+, LV-
virtual channels: EXT (Virt7), LH+ (Virt2), LV+ (Virt3), LV- (Virt4)


You're missing the and virtual channels I talked about. But I was thinking you wanted this on LH±, not LV±, which is probably why you were confused. Sorry 'bout that.

Ch8 mixer1 can not be min/max because that gives me an "on" by default. So I have to use fixed with scale -100.


My understanding is you want channel 8 to change when you hold both EXT and LV±, but to stay the same between those two cases. If you want that you have to use the Min/Max curve with a source of channel 8. This means the default value is indeterminate, or at least I don't know how to determine it. Sorry, there's no way around that. You' may have to check it and change it on power on. An entry for channel 8 in the [SAFETY] section can warn you if it's wrong.

Unfortunately, the plan I had before won't work. It seems that doing multiple buttons the way I had expected to is, um, inconsistent. Since devention doesn't support that, the hardware button matrix may not support it either.

See if you can get your SaveTrim button combo to work with the LV± buttons as well as the LH button you are using now. I suspect those won't work right. If so, it means you'll have to come up with another control plan.

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
25 Aug 2015 19:38 #37208 by AssassinsLament
Replied by AssassinsLament on topic 6 Flight modes on a modded Devo7e with 2x3 Switche
Thanks for your help... I gave up on the momentary EXT button and just decided to use FMODE0/1 as a switch for the two trims LH and LV. I can still use FMODE0/1 as an AUX also, so it works out ok. I will experiment and try to learn some more before trying to tackle it again.

If I just make two buttons, it works fine. The moment I add a third or more, it doesn't work right anymore... So with momentary button, I need at least three buttons (trim save) (autotune on) (autotune off). By changing my strategy to a the FMODE switch/toggle, I only need two buttons... trim save as a momentary, and autotune as a toggle. Seems to work fine for now.

Thanks again!

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

More
25 Aug 2015 23:13 #37210 by AssassinsLament
Replied by AssassinsLament on topic 6 Flight modes on a modded Devo7e with 2x3 Switche
So I just played around with simple momentary buttons using the Exit, Up, Down buttons and as I suspected, I can only use two at a time. Is that a limitation?

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

More
23 Aug 2016 17:15 - 23 Aug 2016 17:26 #53043 by vampy
I tried to get all 6 modes working with the puplished code from here:
[channel5]
template=complex
[mixer]
src=HOLD0
dest=Ch5
switch=SW A0
scalar=-100
usetrim=0
curvetype=fixed
[mixer]
src=HOLD0
dest=Ch5
switch=SW A1
scalar=-67
usetrim=0
curvetype=fixed
[mixer]
src=HOLD0
dest=Ch5
switch=SW A2
scalar=-33
usetrim=0
curvetype=fixed
[mixer]
src=HOLD1
dest=Ch5
switch=HOLD1
scalar=100
usetrim=0
muxtype=add
curvetype=fixed

In ch5 switch mode HOLD0 SW A1 does not activate flight mode 2 it stays on flight mode 1.
If I activate switch position 3 (SW A2), then it activates flight mode 2.
So flight mode 3 is not working.

In ch5 switch mode HOLD1 all is working as it should.
SW A0 activates flight mode 4, SW A1 5 and SW A2 flight mode 6.

So what could be the error with HOLD0?

Thanks in advance!
Last edit: 23 Aug 2016 17:26 by vampy.

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

More
24 Aug 2016 05:58 #53063 by mwm
The model file looks right to me. You should get values of -100, -67, and -33 with HOLD0, and 0, 33, 67 with HOLD1. First thing to check is the channel monitor to verify that those are the values you are getting. If that's right, then check that those are the values your flight controller expects for the modes you want. If that's all correct, then the signals aren't getting from the Tx to the FC properly, and you need to trace them to figure out where the problem is.

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
24 Aug 2016 21:38 #53079 by vampy
In the channel monitor everyhting looked as you said.

But in the flight mode tab mission planner the pwm values were not in range of flight mode 2/3.

So the correct values for me were:
[channel5]
template=complex
[mixer]
src=HOLD0
dest=Ch5
switch=SW A0
scalar=-100
usetrim=0
curvetype=fixed
[mixer]
src=HOLD0
dest=Ch5
switch=SW A1
scalar=-50
usetrim=0
curvetype=fixed
[mixer]
src=HOLD0
dest=Ch5
switch=SW A2
scalar=-20
usetrim=0
curvetype=fixed
[mixer]
src=HOLD1
dest=Ch5
switch=HOLD1
scalar=100
usetrim=0
muxtype=add
curvetype=fixed

Now it works, thanks!

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

Time to create page: 0.040 seconds
Powered by Kunena Forum