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
+8 -1
View File
@@ -820,7 +820,8 @@ void incRotaryEncoder(uint8_t idx, int8_t inc);
#define SET_GVAR(idx, val, p) setGVarValue(idx, val, p)
#endif
#define GV1_SMALL 123
#define GV1_LARGE 1024
// @@@ open.20.fsguruh
#define GV1_LARGE 251
#define GVAR_DISPLAY_TIME 100 /*1 second*/;
extern uint8_t s_gvar_timer;
extern uint8_t s_gvar_last;
@@ -1003,6 +1004,11 @@ void generalDefault();
void modelDefault(uint8_t id);
#if defined(CPUARM)
inline int16_t calc100to256_16Bits(register int16_t x) // @@@2 open.20.fsguruh: return x*2.56
{
return ((int16_t) x * 256) / 100;
}
inline int16_t calc100to256(register int8_t x) // @@@2 open.20.fsguruh: return x*2.56
{
return ((int16_t) x * 256) / 100;
@@ -1034,6 +1040,7 @@ inline int16_t calcRESXto100(register int32_t x)
}
#else
extern int16_t calc100to256_16Bits(int16_t x); // @@@2 open.20.fsguruh: return x*2.56
extern int16_t calc100to256(int8_t x); // @@@2 open.20.fsguruh: return x*2.56
extern int16_t calc100toRESX_16Bits(int16_t x); // @@@ open.20.fsguruh
extern int16_t calc100toRESX(int8_t x);