[BRANCH] Created possibility to increase GVARS number; is set to 9
Warning!!! ========== Be aware this version is in branch and is not supported currently by Companion9x. Whatever you configure will be lost in final version! Because EEPROM interpretation changes anyway because of higher offset and weight values possible in this branch, I tried to align the bits a little bit different to allow a higher number of GVARS. The code change is nearly flash neutral. It costs only 18 bytes flash, but would us allow to either increase range for weight and offset further, or allow more GVARS. I set it to 9 for this branch now. Please try and report. It's very easy now to adjust the GVARS number by changing the constant in myeeprom.h. Just change the MAX_GVARS constant for your build in myeeprom.h in the beginning of the file. The lower MAX_GVARS the higher is the possible number for weight and offset and vice versa. That is quite likely too complicated for conversion so we need to agree maximum for GVARS. Not sure in the moment, but this is a branch only and is just to play with it. Not sure how Bertrand would like this anyway, so may be removed at all.
This commit is contained in:
+3
-2
@@ -1907,7 +1907,7 @@ void gvarWeightItem(xcoord_t x, uint8_t y, MixData *md, uint8_t attr, uint8_t ev
|
||||
// @@@ open.20.fsguruh
|
||||
u_int8int16_t weight;
|
||||
MD_GETWEIGHT(weight,md);
|
||||
weight.word = gvarMenuItem(x, y, weight.word, -245, 245, attr, event);
|
||||
weight.word = gvarMenuItem(x, y, weight.word, GV_RANGELARGE_NEG, GV_RANGELARGE, attr, event);
|
||||
MD_SETWEIGHT(weight,md);
|
||||
//#endif
|
||||
}
|
||||
@@ -1988,7 +1988,7 @@ void menuModelMixOne(uint8_t event)
|
||||
// @@@ open.20.fsguruh
|
||||
u_int8int16_t offset;
|
||||
MD_GETOFFSET(offset,md2);
|
||||
offset.word = gvarMenuItem(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, -245, 245, attr|LEFT, event);
|
||||
offset.word = gvarMenuItem(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_NEG, GV_RANGELARGE, attr|LEFT, event);
|
||||
MD_SETOFFSET(offset,md2);
|
||||
// #else
|
||||
// md2->offset = gvarMenuItem(COLUMN_X+MIXES_2ND_COLUMN, y, md2->offset, -125, 125, attr|LEFT, event);
|
||||
@@ -2307,6 +2307,7 @@ void menuModelExpoMix(uint8_t expo, uint8_t event)
|
||||
else
|
||||
displayGVar(15*FW+2, y, md->curveParam, -100, 100); // open.20.fsguruh
|
||||
// displayGVar(15*FW+2, y, md->curveParam, -125, 125); // only -100 to +100 is allowed now
|
||||
// could be increased now, but is it useful? differentiate with more the +-100% is a fault, correct?
|
||||
}
|
||||
if (md->swtch) putsSwitches(16*FW, y, md->swtch);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user