Do not display disabled trim on main views (#5962)
* Proof of concept * Add Horus * Better implementation * AVR compilation fix
This commit is contained in:
@@ -105,6 +105,11 @@ void displayTrims(uint8_t phase)
|
||||
uint8_t att = ROUND;
|
||||
int16_t val = getTrimValue(phase, i);
|
||||
|
||||
#if defined(CPUARM)
|
||||
if(getRawTrimValue(phase, i).mode == TRIM_MODE_NONE)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
|
||||
int16_t dir = val;
|
||||
bool exttrim = false;
|
||||
|
||||
@@ -96,6 +96,10 @@ void displayTrims(uint8_t phase)
|
||||
int32_t trim = getTrimValue(phase, i);
|
||||
int32_t val = trim;
|
||||
bool exttrim = false;
|
||||
|
||||
if(getRawTrimValue(phase, i).mode == TRIM_MODE_NONE)
|
||||
continue;
|
||||
|
||||
if (val < TRIM_MIN || val > TRIM_MAX) {
|
||||
exttrim = true;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,10 @@ void drawTrims(uint8_t flightMode)
|
||||
coord_t xm = x[stickIndex];
|
||||
int32_t trim = getTrimValue(flightMode, i);
|
||||
|
||||
|
||||
if(getRawTrimValue(flightMode, i).mode == TRIM_MODE_NONE)
|
||||
continue;
|
||||
|
||||
if (vert[i]) {
|
||||
if (g_model.extendedTrims == 1) {
|
||||
drawVerticalSlider(xm, TRIM_V_Y, 160, trim, TRIM_EXTENDED_MIN, TRIM_EXTENDED_MAX, 0, OPTION_SLIDER_EMPTY_BAR|OPTION_SLIDER_TRIM_BUTTON);
|
||||
|
||||
Reference in New Issue
Block a user