From f7f6d7e0dbff3ba134853055e4512fc6ddbeeda9 Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 10 May 2019 15:56:50 +0200 Subject: [PATCH] Horus : do not display POT2 as 6P if it is not --- radio/src/gui/480x272/view_main.cpp | 5 ++++- radio/src/storage/datacopy.cpp | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/radio/src/gui/480x272/view_main.cpp b/radio/src/gui/480x272/view_main.cpp index c4dfffd7f..d39f1b25d 100644 --- a/radio/src/gui/480x272/view_main.cpp +++ b/radio/src/gui/480x272/view_main.cpp @@ -36,7 +36,10 @@ void drawMainPots() { // The 3 pots drawHorizontalSlider(TRIM_LH_X, POTS_LINE_Y, 160, calibratedAnalogs[CALIBRATED_POT1], -RESX, RESX, 40, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_SQUARE_BUTTON); - drawHorizontalSlider(LCD_W/2-20, POTS_LINE_Y, XPOTS_MULTIPOS_COUNT*5, 1 + (potsPos[1] & 0x0f), 1, XPOTS_MULTIPOS_COUNT + 1, XPOTS_MULTIPOS_COUNT, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_NUMBER_BUTTON); + if (IS_POT_MULTIPOS(POT2)) + drawHorizontalSlider(LCD_W/2-20, POTS_LINE_Y, XPOTS_MULTIPOS_COUNT*5, 1 + (potsPos[1] & 0x0f), 1, XPOTS_MULTIPOS_COUNT + 1, XPOTS_MULTIPOS_COUNT, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_NUMBER_BUTTON); + else + drawHorizontalSlider(LCD_W/2-40, POTS_LINE_Y, 80, calibratedAnalogs[CALIBRATED_POT2], -RESX, RESX, 40, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_SQUARE_BUTTON); drawHorizontalSlider(TRIM_RH_X, POTS_LINE_Y, 160, calibratedAnalogs[CALIBRATED_POT3], -RESX, RESX, 40, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_SQUARE_BUTTON); // The 2 rear sliders diff --git a/radio/src/storage/datacopy.cpp b/radio/src/storage/datacopy.cpp index 7878c4042..0d1778170 100644 --- a/radio/src/storage/datacopy.cpp +++ b/radio/src/storage/datacopy.cpp @@ -1,4 +1,4 @@ -//This file was auto-generated by generate_datacopy.py script on Wed Apr 24 15:43:44 2019. Do not edit this file! +//This file was auto-generated by generate_datacopy.py script on Fri May 10 15:48:58 2019. Do not edit this file! @@ -198,12 +198,13 @@ template void copyTrainerModuleData(A * dest, B * src) { dest->mode = src->mode; - dest->spare = src->spare; + dest->spare1 = src->spare1; dest->channelsStart = src->channelsStart; dest->channelsCount = src->channelsCount; dest->frameLength = src->frameLength; dest->delay = src->delay; dest->pulsePol = src->pulsePol; + dest->spare2 = src->spare2; } template