partial TX16s pgup pgdn key fix
This commit is contained in:
@@ -666,7 +666,7 @@ ModelLabelsWindow::ModelLabelsWindow() : Page(ICON_MODEL)
|
||||
#if defined(HARDWARE_KEYS)
|
||||
void ModelLabelsWindow::onEvent(event_t event)
|
||||
{
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
if (event == EVT_KEY_BREAK(KEY_PAGEUP) ||
|
||||
event == EVT_KEY_BREAK(KEY_PAGEDN)) {
|
||||
#else
|
||||
|
||||
@@ -277,7 +277,7 @@ void TabsGroup::onEvent(event_t event)
|
||||
#if defined(HARDWARE_KEYS)
|
||||
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString().c_str(), event);
|
||||
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
if (event == EVT_KEY_FIRST(KEY_PAGEDN)) {
|
||||
#else
|
||||
if (event == EVT_KEY_BREAK(KEY_PAGEDN)) {
|
||||
@@ -286,7 +286,7 @@ void TabsGroup::onEvent(event_t event)
|
||||
uint8_t current = header.carousel.getCurrentIndex() + 1;
|
||||
setCurrentTab(current >= tabs.size() ? 0 : current);
|
||||
}
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
else if (event == EVT_KEY_FIRST(KEY_PAGEUP)) {
|
||||
#else
|
||||
else if (event == EVT_KEY_LONG(KEY_PAGEDN)) {
|
||||
|
||||
@@ -279,7 +279,7 @@ void ViewMain::onEvent(event_t event)
|
||||
new ScreenMenu();
|
||||
break;
|
||||
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
case EVT_KEY_FIRST(KEY_PAGEDN):
|
||||
#else
|
||||
case EVT_KEY_BREAK(KEY_PAGEDN):
|
||||
@@ -292,7 +292,7 @@ void ViewMain::onEvent(event_t event)
|
||||
|
||||
//TODO: these need to go away!
|
||||
// -> board code should map the keys as required
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
case EVT_KEY_FIRST(KEY_PAGEUP):
|
||||
#else
|
||||
case EVT_KEY_LONG(KEY_PAGEDN):
|
||||
|
||||
@@ -3106,7 +3106,7 @@ LROT_BEGIN(etxcst, NULL, 0)
|
||||
LROT_NUMENTRY( EVT_VIRTUAL_ENTER_LONG, EVT_KEY_LONG(KEY_ENTER) )
|
||||
LROT_NUMENTRY( EVT_VIRTUAL_EXIT, EVT_KEY_BREAK(KEY_EXIT) )
|
||||
#elif defined(COLORLCD)
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
LROT_NUMENTRY( EVT_VIRTUAL_PREV_PAGE, EVT_KEY_BREAK(KEY_PAGEUP) )
|
||||
LROT_NUMENTRY( EVT_VIRTUAL_NEXT_PAGE, EVT_KEY_BREAK(KEY_PAGEDN) )
|
||||
#elif defined(PCBNV14)
|
||||
@@ -3157,11 +3157,11 @@ LROT_BEGIN(etxcst, NULL, 0)
|
||||
KEY_EVENTS(DOWN, KEY_DOWN)
|
||||
#endif
|
||||
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
#if defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
KEY_EVENTS(PAGEUP, KEY_PAGEUP)
|
||||
#endif
|
||||
|
||||
#if defined(KEYS_GPIO_REG_PGDN)
|
||||
#if defined(KEYS_GPIO_REG_PAGEDN)
|
||||
KEY_EVENTS(PAGEDN, KEY_PAGEDN)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void LuaEventHandler::onEvent(event_t event)
|
||||
if (event == EVT_KEY_LONG(KEY_EXIT)) {
|
||||
killEvents(KEY_EXIT);
|
||||
}
|
||||
#if !defined(KEYS_GPIO_REG_PGUP)
|
||||
#if !defined(KEYS_GPIO_REG_PAGEGUP)
|
||||
else if (event == EVT_KEY_LONG(KEY_PAGEDN)) {
|
||||
killEvents(KEY_PAGEDN);
|
||||
}
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
// Keys
|
||||
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE | RCC_AHB1Periph_GPIOG | RCC_AHB1Periph_GPIOH | RCC_AHB1Periph_GPIOI | RCC_AHB1Periph_GPIOJ)
|
||||
#if defined(PCBX12S)
|
||||
#define KEYS_GPIO_REG_PGUP GPIOC
|
||||
#define KEYS_GPIO_PIN_PGUP LL_GPIO_PIN_13 // PC.13
|
||||
#define KEYS_GPIO_REG_PGDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PGDN LL_GPIO_PIN_8 // PI.08
|
||||
#define KEYS_GPIO_REG_PAGEUP GPIOC
|
||||
#define KEYS_GPIO_PIN_PAGEUP LL_GPIO_PIN_13 // PC.13
|
||||
#define KEYS_GPIO_REG_PAGEDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PAGEDN LL_GPIO_PIN_8 // PI.08
|
||||
#define KEYS_GPIO_REG_SYS GPIOI
|
||||
#define KEYS_GPIO_PIN_SYS LL_GPIO_PIN_7 // PI.07
|
||||
#define KEYS_GPIO_REG_ENTER GPIOC
|
||||
@@ -50,10 +50,10 @@
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define KEYS_GPIO_REG_ENTER GPIOI
|
||||
#define KEYS_GPIO_PIN_ENTER LL_GPIO_PIN_8 // PI.08
|
||||
#define KEYS_GPIO_REG_PGUP GPIOC
|
||||
#define KEYS_GPIO_PIN_PGUP LL_GPIO_PIN_13 // PC.13
|
||||
#define KEYS_GPIO_REG_PGDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PGDN LL_GPIO_PIN_11 // PI.11
|
||||
#define KEYS_GPIO_REG_PAGEUP GPIOC
|
||||
#define KEYS_GPIO_PIN_PAGEUP LL_GPIO_PIN_13 // PC.13
|
||||
#define KEYS_GPIO_REG_PAGEDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PAGEDN LL_GPIO_PIN_11 // PI.11
|
||||
#define KEYS_GPIO_REG_MDL GPIOI
|
||||
#define KEYS_GPIO_PIN_MDL LL_GPIO_PIN_6 // PI.06
|
||||
#define KEYS_GPIO_REG_EXIT GPIOI
|
||||
@@ -65,8 +65,8 @@
|
||||
#elif defined(PCBX10)
|
||||
#define KEYS_GPIO_REG_ENTER GPIOI
|
||||
#define KEYS_GPIO_PIN_ENTER LL_GPIO_PIN_8 // PI.08
|
||||
#define KEYS_GPIO_REG_PGDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PGDN LL_GPIO_PIN_11 // PI.11
|
||||
#define KEYS_GPIO_REG_PAGEDN GPIOI
|
||||
#define KEYS_GPIO_PIN_PAGEDN LL_GPIO_PIN_11 // PI.11
|
||||
#define KEYS_GPIO_REG_MDL GPIOI
|
||||
#define KEYS_GPIO_PIN_MDL LL_GPIO_PIN_4 // PI.04
|
||||
#define KEYS_GPIO_REG_EXIT GPIOI
|
||||
@@ -253,7 +253,7 @@
|
||||
#define KEYS_GPIOE_PINS (GPIO_Pin_3)
|
||||
#define KEYS_GPIOG_PINS (KEYS_GPIO_PIN_UP | SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_G_H | SWITCHES_GPIO_PIN_G_L | SWITCHES_GPIO_PIN_H | TRIMS_GPIO_PIN_RVD)
|
||||
#define KEYS_GPIOH_PINS (GPIO_Pin_9 | GPIO_Pin_12 | SWITCHES_GPIO_PIN_E_H | SWITCHES_GPIO_PIN_F | ROTARY_ENCODER_GPIO_PIN_A | ROTARY_ENCODER_GPIO_PIN_B)
|
||||
#define KEYS_GPIOI_PINS (KEYS_GPIO_PIN_PGDN | KEYS_GPIO_PIN_LEFT | KEYS_GPIO_PIN_DOWN | SWITCHES_GPIO_PIN_A_L | GPIO_Pin_4)
|
||||
#define KEYS_GPIOI_PINS (KEYS_GPIO_PIN_PAGEDN | KEYS_GPIO_PIN_LEFT | KEYS_GPIO_PIN_DOWN | SWITCHES_GPIO_PIN_A_L | GPIO_Pin_4)
|
||||
#define KEYS_GPIOJ_PINS (SWITCHES_GPIO_PIN_D_H | TRIMS_GPIO_PIN_RVU | TRIMS_GPIO_PIN_LVD | TRIMS_GPIO_PIN_LVU | TRIMS_GPIO_PIN_RSD)
|
||||
#elif defined(PCBX10)
|
||||
#if defined(RADIO_TX16S)
|
||||
|
||||
Reference in New Issue
Block a user