diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 6d70ff2d81..33864465ad 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -239,7 +239,11 @@ void generalDefault() g_eeGeneral.vBatMin = -60; // 0 is 9.0V g_eeGeneral.vBatMax = -78; // 0 is 12.0V #elif defined(PCBHORUS) - g_eeGeneral.potsConfig = 0x19; // S1 and S2 = pots with detent + #if PCBREV >= 13 + g_eeGeneral.potsConfig = 0x1B; // S1 = pot, 6P = multipos, S2 = pot with detent + #else + g_eeGeneral.potsConfig = 0x19; // S1 = pot without detent, 6P = multipos, S2 = pot with detent + #endif g_eeGeneral.slidersConfig = 0x0f; // 4 sliders g_eeGeneral.blOffBright = 20; #elif defined(PCBTARANIS) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index ad7f1518ab..6a8bffe401 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -300,8 +300,8 @@ void memswap(void * a, void * b, uint8_t size); #if defined(PCBHORUS) - #define IS_POT_MULTIPOS(x) ((x)==POT2) - #define IS_POT_WITHOUT_DETENT(x) (true) + #define IS_POT_MULTIPOS(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsConfig>>(2*((x)-POT1)))&0x03)==POT_MULTIPOS_SWITCH) + #define IS_POT_WITHOUT_DETENT(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsConfig>>(2*((x)-POT1)))&0x03)==POT_WITHOUT_DETENT) #elif defined(PCBFLAMENCO) #define IS_POT_MULTIPOS(x) (false) #define IS_POT_WITHOUT_DETENT(x) (false) diff --git a/radio/src/strhelpers.cpp b/radio/src/strhelpers.cpp index 1af28f56d7..8f98ad7499 100644 --- a/radio/src/strhelpers.cpp +++ b/radio/src/strhelpers.cpp @@ -246,7 +246,10 @@ char * getSwitchString(char * dest, swsrc_t idx) #if NUM_XPOTS > 0 else if (idx <= SWSRC_LAST_MULTIPOS_SWITCH) { div_t swinfo = div(idx - SWSRC_FIRST_MULTIPOS_SWITCH, XPOTS_MULTIPOS_COUNT); - strAppendStringWithIndex(s, "S", swinfo.quot*10+swinfo.rem+11); + char temp[LEN_ANA_NAME+1]; + getSourceString(temp, MIXSRC_FIRST_POT+swinfo.quot); + temp[LEN_ANA_NAME]= '\0'; + strAppendStringWithIndex(s, temp, swinfo.rem+1); } #endif else if (idx <= SWSRC_LAST_TRIM) {