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:
+8
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user