Allow ENTER/EXIT to be used with the NV14
This requires enabling HARDWARE_KEYS, otherwise the UI won't have any key handling compiled.
This commit is contained in:
@@ -54,7 +54,7 @@ void TimeEdit::onEvent(event_t event)
|
||||
if (editMode) {
|
||||
if (event == EVT_ROTARY_RIGHT) {
|
||||
int value = getValue();
|
||||
value += rotencSpeed * step;
|
||||
value += ROTARY_ENCODER_SPEED() * step;
|
||||
if (value <= vmax)
|
||||
setValue(value);
|
||||
else
|
||||
@@ -63,7 +63,7 @@ void TimeEdit::onEvent(event_t event)
|
||||
}
|
||||
else if (event == EVT_ROTARY_LEFT) {
|
||||
int value = getValue();
|
||||
value -= rotencSpeed * step;
|
||||
value -= ROTARY_ENCODER_SPEED() * step;
|
||||
if (value >= vmin)
|
||||
setValue(value);
|
||||
else
|
||||
|
||||
@@ -80,7 +80,8 @@ set(SOFTWARE_KEYBOARD ON)
|
||||
|
||||
set(FIRMWARE_DEPENDENCIES datacopy)
|
||||
|
||||
add_definitions(-DSTM32F429_439xx -DSDRAM -DCOLORLCD -DLIBOPENUI -DHARDWARE_TOUCH -DSOFTWARE_KEYBOARD)
|
||||
add_definitions(-DSTM32F429_439xx -DSDRAM -DCOLORLCD -DLIBOPENUI
|
||||
-DHARDWARE_TOUCH -DHARDWARE_KEYS -DSOFTWARE_KEYBOARD)
|
||||
add_definitions(-DEEPROM_VARIANT=0 -DAUDIO -DVOICE -DRTCLOCK)
|
||||
add_definitions(-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE})
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
|
||||
@@ -177,3 +177,5 @@ constexpr LcdFlags TABLE_BODY_FONT = FONT(STD);
|
||||
constexpr int CJK_FIRST_LETTER_INDEX = 128 - 32 + 21;
|
||||
constexpr coord_t CHAR_SPACING = 0;
|
||||
|
||||
// Disable rotary encoder, as the NV14 does not have one
|
||||
#define ROTARY_ENCODER_SPEED() 0
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(RADIO_FAMILY_JUMPER_T12)
|
||||
@@ -404,7 +404,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -407,7 +407,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -417,7 +417,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -427,7 +427,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(RADIO_FAMILY_JUMPER_T12)
|
||||
@@ -409,7 +409,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(PCBXLITE)
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(RADIO_FAMILY_JUMPER_T12)
|
||||
@@ -421,7 +421,7 @@
|
||||
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0 "
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#if defined(PCBHORUS) || defined(PCBNV14)
|
||||
#define LEN_VKEYS "\005"
|
||||
#define TR_VKEYS "PGUP\0""PGDN\0""ENTER""MDL\0 ""RTN\0 ""TELE\0""SYS\0 "
|
||||
#elif defined(RADIO_FAMILY_JUMPER_T12)
|
||||
@@ -426,7 +426,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
#if defined(PCBFRSKY)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#elif !defined(HARDWARE_KEYS)
|
||||
#elif defined(PCBNV14)
|
||||
#define TR_ENTER "[NEXT]"
|
||||
#else
|
||||
#define TR_ENTER "[MENU]"
|
||||
|
||||
Reference in New Issue
Block a user