Proposed modification to BOX Items Activation

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
climb4hope
Posts: 12
Joined: Mon Jan 27, 2014 11:14 pm
Location: Seattle, WA

Proposed modification to BOX Items Activation

Post by climb4hope »

You can select in the GUI multiple AUX channel options to activate certain mode. It simply creates the mask in the conf.activation. The mode will be activated if ANY of the bits in the mask are true based on the following code:

Code: Select all

for(i=0;i<CHECKBOXITEMS;i++)
      rcOptions[i] = (auxState & conf.activate[i])>0;


I guess it would be much better to change this to match ALL bits in the mask. In this case we can do mixing on the firmware side and it is much more straight forward than doing it on the RC as some of the RCs are very limited. The simple example is that we can utilize multiple switches for for different modes. For example with 2 2-position switches we would be able to activate 4 modes instead of just two.

That can also help to configure states that can be enabled together.

A very simple change to the code will do this:

Code: Select all

for(i=0;i<CHECKBOXITEMS;i++)
      rcOptions[i] = ((auxState & conf.activate[i]) == conf.activate[i]);

User avatar
climb4hope
Posts: 12
Joined: Mon Jan 27, 2014 11:14 pm
Location: Seattle, WA

Re: Proposed modification to BOX Items Activation

Post by climb4hope »

Actually there is required one more condition to check whether the conf.activate[i] > 0 in addition to mask, otherwise X & 0 == 0 always true.

This approach helps with mixing but in real case it also prevents having one mode activated with different AUX level within one channel ... So might not be that useful then.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Proposed modification to BOX Items Activation

Post by timecop »

I tried to understand what it is exactly you're trying to do, but I don't get it.
Can you explain what is it you're trying to achieve?

User avatar
climb4hope
Posts: 12
Joined: Mon Jan 27, 2014 11:14 pm
Location: Seattle, WA

Re: Proposed modification to BOX Items Activation

Post by climb4hope »

I was trying to make it possible to select specific mode with the multiple switch combination. For example If I want to set GPS_HOME mode I need to toggle sw1 to pos 2 and sw2 to pos2 (just an example). In this scenario I would be able to have more switch combinations available. For example combining 3pos switch and 2pos switch I would be able to make 6 combinations (the same as mixing channels in the RC)
SW3_POS0 & SW2_POS0 - MODE 1
SW3_POS1 & SW2_POS0 - MODE 2
SW3_POS2 & SW2_POS0 - MODE 3
SW3_POS0 & SW2_POS1 - MODE 4
SW3_POS1 & SW2_POS1 - MODE 5
SW3_POS2 & SW2_POS1 - MODE 6

vs jsut
SW3_POS0 - MODE 1
SW3_POS1 - MODE 2
SW3_POS2 - MODE 3
and independently
SW2_POS0 - MODE 4
SW2_POS1 - MODE 5

But when I did actual testing last night I found it still to be more useful to have original implementation as I can set MODE_X with any of the position of specifc switch AND add another mode to it.
For example
SW3_POS0 - ANGLE MODE
SW3_POS1 - HORIZON MODE
SW3_POS2 - HORIZON & BARO MODE ...

The difference is that in original implementation we have ability to select multiple modes with one switch position and with the proposed change we would be able to select one mode with multiple switch combinations.
This was just an idea when I played with RC without mixing setup and I thought It would give me more options. And it does, but limits other useful options.

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Proposed modification to BOX Items Activation

Post by Plüschi »

Transmitters nowadays have 6 3-way switches and 2 2-way and 4 analog knobs (T14SG) or more (Devo12S) and while in the air i have problems remembering which switch does what. RTH was where?

Having difficulties remembering a simple switch setting, do you think i would remember a switch combo? RTH is SB pos 2 and SC pos 1. Lol, no. I would be totally lost.

I have found myself using the servo monitor mid flight to find out which switch would engage RTH ... true story bro.

LVNeptune
Posts: 19
Joined: Mon Jan 20, 2014 10:54 pm

Re: Proposed modification to BOX Items Activation

Post by LVNeptune »

bro, do you even label print?


User avatar
climb4hope
Posts: 12
Joined: Mon Jan 27, 2014 11:14 pm
Location: Seattle, WA

Re: Proposed modification to BOX Items Activation

Post by climb4hope »

That looks pretty cool!

Post Reply