vinodstanur / open9x

Automatically exported from code.google.com/p/open9x
0 stars 0 forks source link

Expand the weight parameter & output allowed values for intermediate mix steps #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to mix in some math, effectively, that requires intermediate 
calculation steps where the value of the weight parameter (and hence the output 
of that step in the mix) to exceed 125%.  It would be handy to have the option 
to exceed that value for intermediate steps in the mix so that only the last 
step in a series of mixes needs to be in the +/-125% range.  I believe I can do 
this by scaling down and back up at various points to stay in the range but 
keeping track of all of that is a bit troublesome and adds a bunch of scaling 
rows to the mix.

Original issue reported on code.google.com by greg.mcf...@gmail.com on 18 Oct 2012 at 1:55

GoogleCodeExporter commented 8 years ago
Unless I understand wrong, it's already the case. 
For example this setup:
CH1: 100%RUD
+    100% RUD

CH2: 50%CH1

Will result in CH2 moving over the full range. So the 200% result from the CH1 
mixers is carried over, even if the limits make the actual CH1 servo output 
clip at +/-100%.

Original comment by bernet.a...@gmail.com on 23 Oct 2012 at 11:54

GoogleCodeExporter commented 8 years ago

Original comment by bson...@gmail.com on 23 Oct 2012 at 12:06

GoogleCodeExporter commented 8 years ago
What I have run into is a need to multiply by factors of say 4.5 or more, 
although I confess to not trying the additive approach.   Keeping track of 
multiple additive rows/multiplication rows is not a lot of fun, and having the 
option to put say *457% rudder would be helpful

thanks!   

Original comment by greg.mcf...@gmail.com on 23 Oct 2012 at 12:27

GoogleCodeExporter commented 8 years ago
The problem is that weights, offsets, limits and most other values are stored 
in EEPROM and RAM as 8-bit signed numbers, so they can range from -128 to +127, 
which is limited to +/- 125 for "cleanliness". Extending those to 16bit would 
be way too heavy on resources. 

However I see a possible solution... Bertrand is currently implementing a 
"Global variable" system, where we have 5 variables that can be defined as 
being equal to a certain value or mapped to an input or output, and then used 
on any numerical parameter instead of setting a number. 
Those are currently 8-bit, but could be extended to 16bit with reasonable 
impact on memory (only 5 values instead of dozens). Then if you want to set a 
mixer with 457% RUD, you'd instead set the weight of that mixer line to use the 
GV1 global variable, and then set GV1 to 457%. 

Original comment by bernet.a...@gmail.com on 23 Oct 2012 at 2:18

GoogleCodeExporter commented 8 years ago
That would work perfectly I think. 

Original comment by greg.mcf...@gmail.com on 23 Oct 2012 at 2:22

GoogleCodeExporter commented 8 years ago
Done. Today the range [-500:+500] is allowed in the mixer. Still not completely 
tested...

Original comment by bson...@gmail.com on 24 Oct 2012 at 8:40