weight and offset range extension change (flash code cost 22bytes)

This change makes both weight and offset range bigger for all 32 possible mixers.
Instead of -125 to 125 now -245 to 245 is allowed for weight and offset in mixer.
No additional EEPROM is needed. Conversion of EEPROM follow soon...
This commit is contained in:
open.20.fsguruh@xoxy.net
2013-02-21 22:11:33 +00:00
parent 1e3c1d8ce2
commit 2a9160fcab
6 changed files with 100 additions and 74 deletions
+2 -2
View File
@@ -677,7 +677,7 @@ int8_t switchMenuItem(uint8_t x, uint8_t y, int8_t value, LcdFlags attr, uint8_t
}
#if defined(GVARS)
int16_t gvarMenuItem(uint8_t x, uint8_t y, int16_t value, int8_t min, int8_t max, LcdFlags attr, uint8_t event)
int16_t gvarMenuItem(uint8_t x, uint8_t y, int16_t value, int16_t min, int16_t max, LcdFlags attr, uint8_t event) // @@@ open.20.fsguruh
{
uint8_t delta = (max <= 100 ? GV1_SMALL-1 : GV1_LARGE-1);
bool invers = (attr & INVERS);
@@ -701,7 +701,7 @@ int16_t gvarMenuItem(uint8_t x, uint8_t y, int16_t value, int8_t min, int8_t max
}
else {
lcd_outdezAtt(x, y, value, attr);
if (invers) CHECK_INCDEC_MODELVAR(event, value, min, max);
if (invers) value = checkIncDec(event, value, min, max,EE_MODEL); // as proposed, no change to makro, but directly call this function
}
return value;
}