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]);