diff --git a/src/gruvin9x.h b/src/gruvin9x.h index 144fb1fdf..c458c2650 100644 --- a/src/gruvin9x.h +++ b/src/gruvin9x.h @@ -316,7 +316,7 @@ enum EnumKeys { #define CSWITCH_STR "---- v>ofs vofs|v|v2 ""v1=v2 ""v1<=v2 " #define CSW_LEN_FUNC 7 -#define FSWITCH_STR "---- ""Trainer ""Trainer RUD ""Trainer ELE ""Trainer THR ""Trainer AIL ""Instant Trim ""Telemetry View" +#define FSWITCH_STR "---- ""Trainer ""Trainer RUD ""Trainer ELE ""Trainer THR ""Trainer AIL ""Instant Trim ""Trims2Offsets ""Telemetry View" #define FSW_LEN_FUNC 14 #define SWASH_TYPE_STR "--- ""120 ""120X ""140 ""90 " diff --git a/src/main_views.cpp b/src/main_views.cpp index 376ccb402..60c3f9a9c 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -50,6 +50,7 @@ void menuMainView(uint8_t event) { static uint8_t switchView = 255; static bool instantTrimSwLock; + static bool trim2OfsSwLock; uint8_t view = (switchView == 255 ? g_eeGeneral.view : switchView); @@ -149,12 +150,17 @@ void menuMainView(uint8_t event) killEvents(KEY_UP); killEvents(KEY_DOWN); instantTrimSwLock = true; + trim2OfsSwLock = true; break; } bool trimSw = isFunctionActive(FUNC_INSTANT_TRIM); if (!instantTrimSwLock && trimSw) instantTrim(); instantTrimSwLock = trimSw; + + trimSw = isFunctionActive(FUNC_TRIMS_2_OFS); + if (!trim2OfsSwLock && trimSw) moveTrimsToOffsets(); + trim2OfsSwLock = trimSw; #ifdef FRSKY if (view_base == e_telemetry && view > ALTERNATE) { diff --git a/src/model_menus.cpp b/src/model_menus.cpp index 611193976..5461fa188 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -1114,29 +1114,29 @@ static uint8_t s_copySrcIdx; static uint8_t s_copySrcCh; #define FIRST 0x10 -void displayMixerLine(uint8_t row, uint8_t mix, uint8_t ch, uint8_t idx, uint8_t cur, uint8_t event) +inline void displayMixerLine(uint8_t row, uint8_t mix, uint8_t ch, uint8_t idx, uint8_t cur, uint8_t event) { uint8_t y = (row-s_pgOfs)*FH; MixData *md = mixaddress(mix); if (idx > 0) lcd_putsnAtt(FW, y, PSTR("+=*=:=")+md->mltpx*2, 2, 0); - putsChnRaw(4*FW, y, md->srcRaw, 0); + putsChnRaw(4*FW+2, y, md->srcRaw, 0); uint8_t attr = ((s_copyMode || cur != row) ? 0 : INVERS); - lcd_outdezAtt(11*FW, y, md->weight, attr); + lcd_outdezAtt(11*FW+7, y, md->weight, attr); if (attr != 0) CHECK_INCDEC_MODELVAR(event, md->weight, -125, 125); - if (md->curve) lcd_putsnAtt(12*FW, y, PSTR(CURV_STR)+md->curve*3, 3, 0); - if (md->swtch) putsSwitches(16*FW+FW/2, y, md->swtch, 0); + if (md->curve) lcd_putsnAtt(12*FW+7, y, PSTR(CURV_STR)+md->curve*3, 3, 0); + if (md->swtch) putsSwitches(16*FW+6, y, md->swtch, 0); char cs = ' '; if (md->speedDown || md->speedUp) cs = 'S'; if ((md->delayUp || md->delayDown)) cs = (cs =='S' ? '*' : 'D'); - lcd_putcAtt(20*FW+1, y, cs, 0); + lcd_putcAtt(20*FW+3, y, cs, 0); if (s_copyMode) { if ((s_copyMode==COPY_MODE || s_copyTgtOfs == 0) && s_copySrcCh == ch && mix == (s_copySrcIdx + (s_copyTgtOfs<0))) { @@ -1151,7 +1151,7 @@ void displayMixerLine(uint8_t row, uint8_t mix, uint8_t ch, uint8_t idx, uint8_t } } -void displayExpoLine(uint8_t row, uint8_t expo, uint8_t ch, uint8_t idx, uint8_t cur, uint8_t event) +inline void displayExpoLine(uint8_t row, uint8_t expo, uint8_t ch, uint8_t idx, uint8_t cur, uint8_t event) { uint8_t y = (row-s_pgOfs)*FH; ExpoData *ed = expoaddress(expo); diff --git a/src/myeeprom.h b/src/myeeprom.h index 34e1522c4..924c39555 100644 --- a/src/myeeprom.h +++ b/src/myeeprom.h @@ -158,8 +158,9 @@ typedef struct t_SafetySwData { // Safety Switches data #define FUNC_TRAINER_THR 4 #define FUNC_TRAINER_AIL 5 #define FUNC_INSTANT_TRIM 6 -#define FUNC_VIEW_TELEMETRY 7 -#define FUNC_LAST 7 +#define FUNC_TRIMS_2_OFS 7 +#define FUNC_VIEW_TELEMETRY 8 +#define FUNC_LAST 8 typedef struct t_FuncSwData { // Function Switches data int8_t swtch; //input