New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual device #41

Merged
merged 122 commits into from Oct 2, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+30 −30
Diff settings

Always

Just for now

Viewing a subset of changes. View all

mikromk2: update button fb_id info

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
  • Loading branch information...
harryhaaren committed Sep 11, 2017
commit 947fd1e7ef29c74cf09d722af6406eda95578475
@@ -131,44 +131,44 @@ static const struct ni_maschine_mikro_mk2_ctlra_t buttons[] = {
};
#define BUTTONS_SIZE (sizeof(buttons) / sizeof(buttons[0]))
#define MIKRO_BTN (CTLRA_ITEM_BUTTON | CTLRA_ITEM_LED_INTENSITY)
#define MIKRO_BTN (CTLRA_ITEM_BUTTON | CTLRA_ITEM_LED_INTENSITY | CTLRA_ITEM_HAS_FB_ID)
static struct ctlra_item_info_t buttons_info[] = {
/* restart -> grid */
{.x = 20, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 45, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 70, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 95, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 20, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_RESTART},
{.x = 45, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_LEFT},
{.x = 70, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_RIGHT},
{.x = 95, .y = 138, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_GRID},
/* play -> shift */
{.x = 20, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 45, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 70, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 95, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 20, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_PLAY},
{.x = 45, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_REC},
{.x = 70, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_ERASE},
{.x = 95, .y = 156, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_SHIFT},
/* group -> note repeat */
{.x = 20, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 45, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 70, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 95, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 20, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN | CTLRA_ITEM_LED_COLOR, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_GROUP},
{.x = 45, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_BROWSE},
{.x = 70, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_SAMPLING},
{.x = 95, .y = 107, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_NOTE_REPEAT},
/* encoder press */
{.x = 95, .y = 70, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x = 95, .y = 70, .w = 18, .h = 10, .flags = CTLRA_ITEM_BUTTON},
/* F1 -> control */
{.x = 20, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 45, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 70, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 95, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 20, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_F1},
{.x = 45, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_F2},
{.x = 70, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_F3},
{.x = 95, .y = 29, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_CONTROL},
/* Nav -> Main */
{.x = 20, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 45, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 70, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 95, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN},
{.x = 20, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_NAV},
{.x = 45, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_NAV_LEFT},
{.x = 70, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_NAV_RIGHT},
{.x = 95, .y = 87, .w = 18, .h = 5, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_MAIN},
/* Scene -> Mute */
{.x =130, .y = 29, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 47, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 66, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 84, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 103, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 121, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 140, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 158, .w = 18, .h = 10, .flags = MIKRO_BTN},
{.x =130, .y = 29, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_SCENE},
{.x =130, .y = 47, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_PATTERN},
{.x =130, .y = 66, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_PAD_MODE},
{.x =130, .y = 84, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_VIEW},
{.x =130, .y = 103, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_DUPLICATE},
{.x =130, .y = 121, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_SELECT},
{.x =130, .y = 140, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_SOLO},
{.x =130, .y = 158, .w = 18, .h = 10, .flags = MIKRO_BTN, .fb_id = NI_MASCHINE_MIKRO_MK2_LED_MUTE},
};
#define ENCODERS_SIZE (1)
ProTip! Use n and p to navigate between commits in a pull request.