[ersky9x] rotary encoders inversion
RE1 and RE2 renamed as REa and REb (will be needed for Flight Phases uses)
This commit is contained in:
+2
-2
@@ -334,7 +334,7 @@ RUN_FROM_FLASH = 1
|
|||||||
ifeq ($(PCB), ARM)
|
ifeq ($(PCB), ARM)
|
||||||
# V4 ARM, so ...
|
# V4 ARM, so ...
|
||||||
OPT = 2
|
OPT = 2
|
||||||
CPPDEFS += -DPCBARM -DAUDIO -DHAPTIC -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS
|
CPPDEFS += -DPCBARM -DAUDIO -DHAPTIC -DPXX -DDSM2 -DDSM2_PPM -DROTARY_ENCODERS=1
|
||||||
EXTRAINCDIRS += ersky9x CoOS/kernel CoOS/portable
|
EXTRAINCDIRS += ersky9x CoOS/kernel CoOS/portable
|
||||||
BOARDSRC = board_ersky9x.cpp
|
BOARDSRC = board_ersky9x.cpp
|
||||||
SRC += ersky9x/core_cm3.c ersky9x/board_lowlevel.c ersky9x/crt.c ersky9x/vectors_sam3s.c
|
SRC += ersky9x/core_cm3.c ersky9x/board_lowlevel.c ersky9x/crt.c ersky9x/vectors_sam3s.c
|
||||||
@@ -352,7 +352,7 @@ endif
|
|||||||
ifeq ($(PCB), V4)
|
ifeq ($(PCB), V4)
|
||||||
# V4 PCB, so ...
|
# V4 PCB, so ...
|
||||||
OPT = 2
|
OPT = 2
|
||||||
CPPDEFS += -DPCBV4 -DAUDIO -DHAPTIC -DROTARY_ENCODERS
|
CPPDEFS += -DPCBV4 -DAUDIO -DHAPTIC -DROTARY_ENCODERS=2
|
||||||
EXTRAINCDIRS += gruvin9x stock FatFs FatFs/option
|
EXTRAINCDIRS += gruvin9x stock FatFs FatFs/option
|
||||||
BOARDSRC += board_gruvin9x.cpp
|
BOARDSRC += board_gruvin9x.cpp
|
||||||
EEPROMSRC = eeprom_avr.cpp
|
EEPROMSRC = eeprom_avr.cpp
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ inline void setup_switches()
|
|||||||
|
|
||||||
#ifdef SIMU
|
#ifdef SIMU
|
||||||
#define end_ppm_capture()
|
#define end_ppm_capture()
|
||||||
|
#define stop_rotary_encoder()
|
||||||
#define sam_boot()
|
#define sam_boot()
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -444,11 +445,11 @@ extern "C" void PIOC_IRQHandler()
|
|||||||
{
|
{
|
||||||
if ( ( Rotary_position & 0x01 ) ^ ( ( dummy & 0x04) >> 2 ) )
|
if ( ( Rotary_position & 0x01 ) ^ ( ( dummy & 0x04) >> 2 ) )
|
||||||
{
|
{
|
||||||
incRotaryEncoder(0, -1);
|
incRotaryEncoder(0, +1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
incRotaryEncoder(0, +1);
|
incRotaryEncoder(0, -1);
|
||||||
}
|
}
|
||||||
Rotary_position &= ~0x45 ;
|
Rotary_position &= ~0x45 ;
|
||||||
Rotary_position |= dummy ;
|
Rotary_position |= dummy ;
|
||||||
@@ -1023,7 +1024,7 @@ void readKeysAndTrims()
|
|||||||
register uint32_t i;
|
register uint32_t i;
|
||||||
|
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
keys[BTN_RE1].input(PIOB->PIO_PDSR & 0x40, BTN_RE1);
|
keys[BTN_REa].input(PIOB->PIO_PDSR & 0x40, BTN_REa);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t enuk = KEY_MENU;
|
uint8_t enuk = KEY_MENU;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ ISR(USART1_RX_vect)
|
|||||||
resh = (resh >> 1) & 0x01;
|
resh = (resh >> 1) & 0x01;
|
||||||
res = ((resh << 8) | resl);
|
res = ((resh << 8) | resl);
|
||||||
if((res == 0x180) | (res == 0x1C0)){ //button REb filter
|
if((res == 0x180) | (res == 0x1C0)){ //button REb filter
|
||||||
keys[BTN_RE1].input((res & 0x1C0) == 0x1C0, BTN_RE1);
|
keys[BTN_REa].input((res & 0x1C0) == 0x1C0, BTN_REa);
|
||||||
} else if((res & 0x100) == 0x100){ //rotary filter
|
} else if((res & 0x100) == 0x100){ //rotary filter
|
||||||
vpotToChange = res & 0xEF;
|
vpotToChange = res & 0xEF;
|
||||||
vpot_mod_state = 1;
|
vpot_mod_state = 1;
|
||||||
@@ -275,9 +275,9 @@ void readKeysAndTrims()
|
|||||||
uint8_t enuk = KEY_MENU;
|
uint8_t enuk = KEY_MENU;
|
||||||
|
|
||||||
#if !defined(EXTRA_ROTARY_ENCODERS)
|
#if !defined(EXTRA_ROTARY_ENCODERS)
|
||||||
keys[BTN_RE1].input(~PIND & 0x20, BTN_RE1);
|
keys[BTN_REa].input(~PIND & 0x20, BTN_REa);
|
||||||
#endif //!EXTRA_ROTARY_ENCODERS
|
#endif //!EXTRA_ROTARY_ENCODERS
|
||||||
keys[BTN_RE2].input(~PIND & 0x10, BTN_RE2);
|
keys[BTN_REb].input(~PIND & 0x10, BTN_REb);
|
||||||
|
|
||||||
uint8_t tin = ~PINL;
|
uint8_t tin = ~PINL;
|
||||||
uint8_t in;
|
uint8_t in;
|
||||||
|
|||||||
@@ -300,10 +300,10 @@ void menuProcSetup(uint8_t event)
|
|||||||
|
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case ITEM_SETUP_RE_NAVIGATION:
|
case ITEM_SETUP_RE_NAVIGATION:
|
||||||
g_eeGeneral.reNavigation = selectMenuItem(y, STR_RENAVIG, STR_VRENAVIG, g_eeGeneral.reNavigation, 0, 2, attr, event);
|
g_eeGeneral.reNavigation = selectMenuItem(y, STR_RENAVIG, STR_VRENAVIG, g_eeGeneral.reNavigation, 0, ROTARY_ENCODERS, attr, event);
|
||||||
if (attr && checkIncDec_Ret) {
|
if (attr && checkIncDec_Ret) {
|
||||||
g_rotenc[0] = 0;
|
for (uint8_t i=0; i<ROTARY_ENCODERS; i++)
|
||||||
g_rotenc[1] = 0;
|
g_rotenc[i] = 0;
|
||||||
p1valdiff = 0;
|
p1valdiff = 0;
|
||||||
scrollRE = 0;
|
scrollRE = 0;
|
||||||
}
|
}
|
||||||
@@ -761,10 +761,10 @@ void menuProcDiagKeys(uint8_t event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined (ROTARY_ENCODERS)
|
#if defined (ROTARY_ENCODERS)
|
||||||
for(uint8_t i=0; i<2; i++) {
|
for(uint8_t i=0; i<ROTARY_ENCODERS; i++) {
|
||||||
uint8_t y = i*FH + FH;
|
uint8_t y = i*FH + FH;
|
||||||
lcd_putsiAtt(14*FW, y, STR_RE1RE2, i, 0);
|
lcd_putsiAtt(14*FW, y, STR_VRENCODERS, i, 0);
|
||||||
lcd_outdezNAtt(18*FW, y, g_rotenc[i], LEFT|(keyState((EnumKeys)(BTN_RE1+i)) ? INVERS : 0));
|
lcd_outdezNAtt(18*FW, y, g_rotenc[i], LEFT|(keyState((EnumKeys)(BTN_REa+i)) ? INVERS : 0));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -178,8 +178,8 @@ void menuMainView(uint8_t event)
|
|||||||
killEvents(KEY_DOWN);
|
killEvents(KEY_DOWN);
|
||||||
break;
|
break;
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_LONG(BTN_RE1):
|
case EVT_KEY_LONG(BTN_REa):
|
||||||
case EVT_KEY_LONG(BTN_RE2):
|
case EVT_KEY_LONG(BTN_REb):
|
||||||
if (navigationRotaryEncoder(event)) {
|
if (navigationRotaryEncoder(event)) {
|
||||||
killEvents(event);
|
killEvents(event);
|
||||||
if (s_inflight_value && !s_inflight_enable) {
|
if (s_inflight_value && !s_inflight_enable) {
|
||||||
@@ -189,8 +189,8 @@ void menuMainView(uint8_t event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// no break
|
// no break
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
s_inflight_enable = false;
|
s_inflight_enable = false;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+12
-13
@@ -185,6 +185,13 @@ bool check_submenu_simple(uint8_t event, uint8_t maxrow)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
|
|
||||||
|
#if defined(PCBARM)
|
||||||
|
#define ROTARY_ENCODER_GRANULARITY 4
|
||||||
|
#else
|
||||||
|
#define ROTARY_ENCODER_GRANULARITY 1
|
||||||
|
#endif
|
||||||
|
|
||||||
void check_rotary_encoder()
|
void check_rotary_encoder()
|
||||||
{
|
{
|
||||||
// check rotary encoder 1 if changed -> cursor down/up
|
// check rotary encoder 1 if changed -> cursor down/up
|
||||||
@@ -193,17 +200,9 @@ void check_rotary_encoder()
|
|||||||
if (g_eeGeneral.reNavigation) {
|
if (g_eeGeneral.reNavigation) {
|
||||||
uint8_t re = g_eeGeneral.reNavigation - 1;
|
uint8_t re = g_eeGeneral.reNavigation - 1;
|
||||||
p1valdiff = 0;
|
p1valdiff = 0;
|
||||||
#if defined(PCBARM)
|
scrollRE = re1valprev - (g_rotenc[re] / ROTARY_ENCODER_GRANULARITY);
|
||||||
scrollRE = re1valprev - g_rotenc[re] /4;
|
|
||||||
#else
|
|
||||||
scrollRE = re1valprev - g_rotenc[re];
|
|
||||||
#endif
|
|
||||||
if (scrollRE) {
|
if (scrollRE) {
|
||||||
#if defined(PCBARM)
|
re1valprev = (g_rotenc[re] / ROTARY_ENCODER_GRANULARITY);
|
||||||
re1valprev = g_rotenc[re] / 4;
|
|
||||||
#else
|
|
||||||
re1valprev = g_rotenc[re];
|
|
||||||
#endif
|
|
||||||
if (s_editMode > 0) {
|
if (s_editMode > 0) {
|
||||||
p1valdiff = -scrollRE;
|
p1valdiff = -scrollRE;
|
||||||
scrollRE = 0;
|
scrollRE = 0;
|
||||||
@@ -238,12 +237,12 @@ bool check(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTa
|
|||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
if (!(s_warning || s_sdcard_error || s_menu_count))
|
if (!(s_warning || s_sdcard_error || s_menu_count))
|
||||||
check_rotary_encoder();
|
check_rotary_encoder();
|
||||||
if (m_posVert < 0 && (event==EVT_KEY_FIRST(BTN_RE1) || event==EVT_KEY_FIRST(BTN_RE2) || event==EVT_KEY_FIRST(KEY_MENU))) {
|
if (m_posVert < 0 && (event==EVT_KEY_FIRST(BTN_REa) || event==EVT_KEY_FIRST(BTN_REb) || event==EVT_KEY_FIRST(KEY_MENU))) {
|
||||||
popMenu();
|
popMenu();
|
||||||
killEvents(event);
|
killEvents(event);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (g_eeGeneral.reNavigation && event == EVT_KEY_BREAK(BTN_RE1+g_eeGeneral.reNavigation-1)) {
|
if (g_eeGeneral.reNavigation && event == EVT_KEY_BREAK(BTN_REa+g_eeGeneral.reNavigation-1)) {
|
||||||
if (s_editMode > 0 && (maxcol & ZCHAR)) {
|
if (s_editMode > 0 && (maxcol & ZCHAR)) {
|
||||||
if (m_posHorz < maxcol-ZCHAR) {
|
if (m_posHorz < maxcol-ZCHAR) {
|
||||||
m_posHorz++;
|
m_posHorz++;
|
||||||
@@ -681,7 +680,7 @@ void checkInFlightIncDecModel(uint8_t event, int8_t *value, int8_t i_min, int8_t
|
|||||||
{
|
{
|
||||||
*value = (((uint8_t)(*value)) & ((1 << bitshift) - 1)) + ((i_shift + checkIncDecModel(event, (((uint8_t)(*value)) >> bitshift)-i_shift, i_min, i_max)) << bitshift);
|
*value = (((uint8_t)(*value)) & ((1 << bitshift) - 1)) + ((i_shift + checkIncDecModel(event, (((uint8_t)(*value)) >> bitshift)-i_shift, i_min, i_max)) << bitshift);
|
||||||
|
|
||||||
if (g_eeGeneral.reNavigation && event == EVT_KEY_LONG(BTN_RE1+g_eeGeneral.reNavigation-1)) {
|
if (g_eeGeneral.reNavigation && event == EVT_KEY_LONG(BTN_REa+g_eeGeneral.reNavigation-1)) {
|
||||||
if (value == s_inflight_value) {
|
if (value == s_inflight_value) {
|
||||||
s_inflight_value = NULL;
|
s_inflight_value = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -82,8 +82,8 @@ void menuProcDebug(uint8_t event);
|
|||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
extern int8_t scrollRE;
|
extern int8_t scrollRE;
|
||||||
extern int16_t p1valdiff;
|
extern int16_t p1valdiff;
|
||||||
#define IS_RE_NAVIGATION_EVT_TYPE(event, type) (g_eeGeneral.reNavigation && event==type(BTN_RE1 + g_eeGeneral.reNavigation - 1))
|
#define IS_RE_NAVIGATION_EVT_TYPE(event, type) (g_eeGeneral.reNavigation && event==type(BTN_REa + g_eeGeneral.reNavigation - 1))
|
||||||
#define IS_RE_NAVIGATION_EVT(event) (g_eeGeneral.reNavigation && (event&EVT_KEY_MASK)==(BTN_RE1 + g_eeGeneral.reNavigation - 1))
|
#define IS_RE_NAVIGATION_EVT(event) (g_eeGeneral.reNavigation && (event&EVT_KEY_MASK)==(BTN_REa + g_eeGeneral.reNavigation - 1))
|
||||||
#else
|
#else
|
||||||
#define IS_RE_NAVIGATION_EVT_TYPE(event, type) (0)
|
#define IS_RE_NAVIGATION_EVT_TYPE(event, type) (0)
|
||||||
#define IS_RE_NAVIGATION_EVT(event) (0)
|
#define IS_RE_NAVIGATION_EVT(event) (0)
|
||||||
|
|||||||
+17
-17
@@ -269,13 +269,13 @@ void menuProcModelSelect(uint8_t event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
if (navigationRotaryEncoder(_event))
|
if (navigationRotaryEncoder(_event))
|
||||||
s_editMode = (s_editMode == 0 && sub == g_eeGeneral.currModel) ? -1 : 0;
|
s_editMode = (s_editMode == 0 && sub == g_eeGeneral.currModel) ? -1 : 0;
|
||||||
break;
|
break;
|
||||||
case EVT_KEY_LONG(BTN_RE1):
|
case EVT_KEY_LONG(BTN_REa):
|
||||||
case EVT_KEY_LONG(BTN_RE2):
|
case EVT_KEY_LONG(BTN_REb):
|
||||||
if (!navigationRotaryEncoder(_event))
|
if (!navigationRotaryEncoder(_event))
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -518,13 +518,13 @@ void EditName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, boo
|
|||||||
if (next<size-1) next++;
|
if (next<size-1) next++;
|
||||||
break;
|
break;
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_LONG(BTN_RE1):
|
case EVT_KEY_LONG(BTN_REa):
|
||||||
case EVT_KEY_LONG(BTN_RE2):
|
case EVT_KEY_LONG(BTN_REb):
|
||||||
if (!navigationRotaryEncoder(event))
|
if (!navigationRotaryEncoder(event))
|
||||||
break;
|
break;
|
||||||
if (v==0) {
|
if (v==0) {
|
||||||
s_editMode = 0;
|
s_editMode = 0;
|
||||||
killEvents(BTN_RE1);
|
killEvents(BTN_REa);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// no break
|
// no break
|
||||||
@@ -914,8 +914,8 @@ void menuProcPhasesAll(uint8_t event)
|
|||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
if (!navigationRotaryEncoder(event))
|
if (!navigationRotaryEncoder(event))
|
||||||
break;
|
break;
|
||||||
// no break
|
// no break
|
||||||
@@ -1120,8 +1120,8 @@ void menuProcCurveOne(uint8_t event)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
if (!navigationRotaryEncoder(event))
|
if (!navigationRotaryEncoder(event))
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -1714,10 +1714,10 @@ void menuProcExpoMix(uint8_t expo, uint8_t _event_)
|
|||||||
}
|
}
|
||||||
// no break
|
// no break
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
case EVT_KEY_LONG(BTN_RE1):
|
case EVT_KEY_LONG(BTN_REa):
|
||||||
case EVT_KEY_LONG(BTN_RE2):
|
case EVT_KEY_LONG(BTN_REb):
|
||||||
if (sub == 0)
|
if (sub == 0)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -2099,8 +2099,8 @@ void menuProcCurvesAll(uint8_t event)
|
|||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
case EVT_KEY_BREAK(BTN_RE1):
|
case EVT_KEY_BREAK(BTN_REa):
|
||||||
case EVT_KEY_BREAK(BTN_RE2):
|
case EVT_KEY_BREAK(BTN_REb):
|
||||||
if (!navigationRotaryEncoder(event))
|
if (!navigationRotaryEncoder(event))
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+5
-1
@@ -2865,7 +2865,11 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim
|
|||||||
|
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
// Rotary encoder interrupts
|
// Rotary encoder interrupts
|
||||||
volatile uint8_t g_rotenc[2] = {0};
|
#if defined(PCBARM)
|
||||||
|
volatile uint32_t g_rotenc[ROTARY_ENCODERS] = {0};
|
||||||
|
#else
|
||||||
|
volatile uint8_t g_rotenc[ROTARY_ENCODERS] = {0};
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
|
|||||||
+9
-5
@@ -310,8 +310,8 @@ enum EnumKeys {
|
|||||||
TRM_RH_DWN ,
|
TRM_RH_DWN ,
|
||||||
TRM_RH_UP ,
|
TRM_RH_UP ,
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
BTN_RE1,
|
BTN_REa,
|
||||||
BTN_RE2,
|
BTN_REb,
|
||||||
#endif
|
#endif
|
||||||
//SW_NC ,
|
//SW_NC ,
|
||||||
//SW_ON ,
|
//SW_ON ,
|
||||||
@@ -546,7 +546,7 @@ int16_t getRotaryEncoder(uint8_t idx);
|
|||||||
void incRotaryEncoder(uint8_t idx, int8_t inc);
|
void incRotaryEncoder(uint8_t idx, int8_t inc);
|
||||||
inline bool navigationRotaryEncoder(uint8_t event)
|
inline bool navigationRotaryEncoder(uint8_t event)
|
||||||
{
|
{
|
||||||
return g_eeGeneral.reNavigation == ((event & EVT_KEY_MASK) - BTN_RE1 + 1);
|
return g_eeGeneral.reNavigation == ((event & EVT_KEY_MASK) - BTN_REa + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -820,9 +820,13 @@ inline bool isFunctionActive(uint8_t func)
|
|||||||
extern char userDataDisplayBuf[TELEM_SCREEN_BUFFER_SIZE]; // text buffer for frsky telem. user data experiments
|
extern char userDataDisplayBuf[TELEM_SCREEN_BUFFER_SIZE]; // text buffer for frsky telem. user data experiments
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
// Global rotary encoder registers -- 8-bit, 0-255
|
// Global rotary encoder registers -- 8-bit, 0-255
|
||||||
extern volatile uint8_t g_rotenc[2];
|
#if defined(PCBARM)
|
||||||
|
extern volatile uint32_t g_rotenc[ROTARY_ENCODERS];
|
||||||
|
#else
|
||||||
|
extern volatile uint8_t g_rotenc[ROTARY_ENCODERS];
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef JETI
|
#ifdef JETI
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
|||||||
ISTR(VBEEPMODE)
|
ISTR(VBEEPMODE)
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
ISTR(VRENAVIG)
|
ISTR(VRENAVIG)
|
||||||
ISTR(RE1RE2)
|
ISTR(VRENCODERS)
|
||||||
#endif
|
#endif
|
||||||
ISTR(VFILTERADC)
|
ISTR(VFILTERADC)
|
||||||
ISTR(TRNMODE)
|
ISTR(TRNMODE)
|
||||||
|
|||||||
+3
-3
@@ -71,8 +71,8 @@ extern const pm_char STR_OPEN9X[];
|
|||||||
#endif
|
#endif
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
#define OFS_VRENAVIG (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
#define OFS_VRENAVIG (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||||
#define OFS_RE1RE2 (OFS_VRENAVIG + sizeof(TR_VRENAVIG))
|
#define OFS_VRENCODERS (OFS_VRENAVIG + sizeof(TR_VRENAVIG))
|
||||||
#define OFS_VFILTERADC (OFS_RE1RE2 + sizeof(TR_RE1RE2))
|
#define OFS_VFILTERADC (OFS_VRENCODERS + sizeof(TR_VRENCODERS))
|
||||||
#else
|
#else
|
||||||
#define OFS_VFILTERADC (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
#define OFS_VFILTERADC (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||||
#endif
|
#endif
|
||||||
@@ -189,7 +189,7 @@ extern const pm_char STR_OPEN9X[];
|
|||||||
|
|
||||||
#if defined(ROTARY_ENCODERS)
|
#if defined(ROTARY_ENCODERS)
|
||||||
#define STR_VRENAVIG (STR_OPEN9X + OFS_VRENAVIG)
|
#define STR_VRENAVIG (STR_OPEN9X + OFS_VRENAVIG)
|
||||||
#define STR_RE1RE2 (STR_OPEN9X + OFS_RE1RE2)
|
#define STR_VRENCODERS (STR_OPEN9X + OFS_VRENCODERS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBV4)
|
#if defined(PCBV4)
|
||||||
|
|||||||
@@ -205,8 +205,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " Menu"" Exit"" Dol\211""Nhoru""Vprvo""Vlevo"
|
#define TR_VKEYS " Menu"" Exit"" Dol\211""Nhoru""Vprvo""Vlevo"
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
@@ -205,8 +205,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " Menu"" Exit""Unten"" Oben"" Re."" Li."
|
#define TR_VKEYS " Menu"" Exit""Unten"" Oben"" Re."" Li."
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
@@ -206,8 +206,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " Menu"" Exit"" Down"" Up""Right"" Left"
|
#define TR_VKEYS " Menu"" Exit"" Down"" Up""Right"" Left"
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
@@ -203,8 +203,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " Menu"" Exit"" Bas"" Haut""Droit""Gauch"
|
#define TR_VKEYS " Menu"" Exit"" Bas"" Haut""Droit""Gauch"
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
@@ -205,8 +205,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " Men\200"" EXIT"" DN "" UP"" SX"" DX"
|
#define TR_VKEYS " Men\200"" EXIT"" DN "" UP"" SX"" DX"
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
@@ -203,8 +203,8 @@
|
|||||||
#define LEN_VKEYS "\005"
|
#define LEN_VKEYS "\005"
|
||||||
#define TR_VKEYS " MENU"" EXIT"" Ned"" Upp""H\202ger""V\201nst"
|
#define TR_VKEYS " MENU"" EXIT"" Ned"" Upp""H\202ger""V\201nst"
|
||||||
|
|
||||||
#define LEN_RE1RE2 "\003"
|
#define LEN_VRENCODERS "\003"
|
||||||
#define TR_RE1RE2 "RE1""RE2"
|
#define TR_VRENCODERS "REa""REb"
|
||||||
|
|
||||||
#define LEN_VSWITCHES "\003"
|
#define LEN_VSWITCHES "\003"
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
|
|||||||
Reference in New Issue
Block a user