1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +03:00

8bits overflow in limits

This commit is contained in:
bsongis 2014-03-26 09:36:04 +01:00
parent f9b9df3a83
commit 22942b3615

View file

@ -3748,7 +3748,7 @@ enum LimitsItems {
#define LIMITS_DIRECTION_POS 21*FW #define LIMITS_DIRECTION_POS 21*FW
#define LIMITS_MAX_POS 26*FW #define LIMITS_MAX_POS 26*FW
#define LIMITS_REVERT_POS 27*FW #define LIMITS_REVERT_POS 27*FW
#define LIMITS_CURVE_POS 32*FW #define LIMITS_CURVE_POS 32*FW-3
#endif #endif
#else #else
#if defined(PPM_UNIT_US) #if defined(PPM_UNIT_US)
@ -3884,10 +3884,16 @@ void menuModelLimits(uint8_t event)
lcd_putc(LIMITS_DIRECTION_POS, y, swVal); lcd_putc(LIMITS_DIRECTION_POS, y, swVal);
#endif #endif
#if defined(PPM_CENTER_ADJUSTABLE) #if defined(CPUARM)
int8_t limit = ((g_model.extendedLimits && !limitAddress(k)->ppmCenter) ? 125 : 100); int limit;
#else #else
int8_t limit = (g_model.extendedLimits ? 125 : 100); int8_t limit;
#endif
#if defined(PPM_CENTER_ADJUSTABLE)
limit = ((g_model.extendedLimits && !limitAddress(k)->ppmCenter) ? 125 : 100);
#else
limit = (g_model.extendedLimits ? 125 : 100);
#endif #endif
#if defined(PCBTARANIS) #if defined(PCBTARANIS)