mirror of
https://github.com/opentx/opentx.git
synced 2025-07-14 03:49:52 +03:00
Massive clean thanks to Schwabe : unifdef -m -DCPUARM -UCPUM64 -UCPUM2560 -UPCBSTD -UPCBMEGA2560 -UPCBGRUVIN9X -UPCB9X $(find . -name "*.cpp" -or -name "*.h")
This commit is contained in:
parent
c032b30247
commit
dd632969f3
106 changed files with 27 additions and 6626 deletions
|
@ -20,31 +20,6 @@
|
|||
|
||||
#include "opentx.h"
|
||||
|
||||
#if defined(PCBSTD)
|
||||
int16_t getGVarFieldValue(int16_t x, int16_t min, int16_t max)
|
||||
{
|
||||
if (GV_IS_GV_VALUE(x, min, max)) {
|
||||
int8_t idx = GV_INDEX_CALCULATION(x, max);
|
||||
int8_t mul = 1;
|
||||
|
||||
if (idx < 0) {
|
||||
idx = -1-idx;
|
||||
mul = -1;
|
||||
}
|
||||
|
||||
x = GVAR_VALUE(idx, -1) * mul;
|
||||
}
|
||||
|
||||
return limit(min, x, max);
|
||||
}
|
||||
|
||||
void setGVarValue(uint8_t idx, int8_t value)
|
||||
{
|
||||
if (GVAR_VALUE(idx, -1) != value) {
|
||||
SET_GVAR_VALUE(idx, -1, value);
|
||||
}
|
||||
}
|
||||
#else
|
||||
uint8_t gvarDisplayTimer = 0;
|
||||
uint8_t gvarLastChanged = 0;
|
||||
|
||||
|
@ -115,4 +90,3 @@ int32_t getGVarFieldValuePrec1(int16_t val, int16_t min, int16_t max, int8_t fm)
|
|||
}
|
||||
return limit<int>(min*10, val, max*10);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue