Rotary encoder emulates PLUS and MINUS keys

This commit is contained in:
Damjan Adamic
2014-11-30 19:46:44 +01:00
parent b64d200c94
commit 9980d11740
10 changed files with 75 additions and 20 deletions
+5
View File
@@ -462,8 +462,13 @@ void displayWarning(uint8_t event);
#if defined(PCBTARANIS)
#define KEY_MOVE_UP KEY_PLUS
#define KEY_MOVE_DOWN KEY_MINUS
#if defined(REV9E)
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
#else
#define CURSOR_MOVED_LEFT(event) (EVT_KEY_MASK(event) == KEY_PLUS)
#define CURSOR_MOVED_RIGHT(event) (EVT_KEY_MASK(event) == KEY_MINUS)
#endif
#define CASE_EVT_ROTARY_MOVE_RIGHT CASE_EVT_ROTARY_LEFT
#define CASE_EVT_ROTARY_MOVE_LEFT CASE_EVT_ROTARY_RIGHT
#define IS_ROTARY_MOVE_RIGHT IS_ROTARY_LEFT