[BRANCH] preperation for merge to trunk; GVARS 5; introduced RANGE constant

I would like Bertrand to check this version. It's currently my proposal for the merge. It holds following changes:

- Introduced constant RESERVE_RANGE_FOR_GVARS to make number of MAX_GVARS independent.
- NEGATIVE_SHIFT_CORRECTION is now set by makefile by default instead inside the code
  The would at least give the option to save code and have less precise calculation.
- ex_chans is included like in trunk. No change here, because it would break output as input.

Actually this version would reduce the effort to merge:

- We stay with the GVARS defines we had till now
- We reserve for ranges space for 10 GVARS, which do not hurt, because  we doubled ranges anyway.
- We stay with 5 GVARS in the moment. According my poll not many people currently use GVARS.
  Therefore there is plenty of time finding here a better solution. I expect the number of 
  people will increase soon, but up to this moment 5 GVARS are more than enough.
- The layout of EEPROM for the values is already the new format. That means when we allow more GVARS in future, at least the parameters like weight, offset, etc. needs no additional conversion.

What do you think. Should we go this way?
This commit is contained in:
open.20.fsguruh@xoxy.net
2013-03-09 17:19:56 +00:00
parent 7b5cca58c0
commit 67689c8f71
4 changed files with 23 additions and 21 deletions
+11 -1
View File
@@ -98,9 +98,15 @@ AUDIO = NO
VOICE = NO
# corrects different rounding for negative values. So instead of -99.9 you will see again -100.0
CORRECT_NEGATIVE_VALUES = NO
# Values = YES, NO
CORRECT_NEGATIVE_VALUES = YES
# adds additional code to prevent arithmetic overflows. MAX or MIN values stays. Not yet guaranteed!! Just improved
# Values = YES, NO
ARITHMETIC_OVERFLOW_CHECK = NO
# increases range of expo curve but costs about 82 bytes flash
# Values = YES, NO
EXTENDED_EXPO_CURVE = NO
# HAPTIC Mods
@@ -420,6 +426,10 @@ ifeq ($(CORRECT_NEGATIVE_VALUES), YES)
CPPDEFS += -DCORRECT_NEGATIVE_SHIFTS
endif
ifeq ($(ARITHMETIC_OVERFLOW_CHECK), YES)
CPPDEFS += -DPREVENT_ARITHMETIC_OVERFLOW
endif
ifeq ($(EXTENDED_EXPO_CURVE), YES)
CPPDEFS += -DEXTENDED_EXPO
endif