mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
ctlrscript: grid press/release and launch scene added
This commit is contained in:
parent
c00895cf40
commit
fa401ae142
2 changed files with 29 additions and 0 deletions
|
@ -91,6 +91,22 @@ void luppp_do(enum EVENT_ID id, void* e)
|
|||
jack->getLogic()->trackJackSendActivate(ev->track, ev->active);
|
||||
break;
|
||||
}
|
||||
case EVENT_GRID_PRESS_RELEASE: {
|
||||
struct event_grid_press_release *ev =
|
||||
(struct event_grid_press_release *)e;
|
||||
/* TODO: Refactor to GridLogic::press_release(int pressed);*/
|
||||
if(ev->pressed)
|
||||
jack->getGridLogic()->pressed(ev->track, ev->scene);
|
||||
else
|
||||
jack->getGridLogic()->released(ev->track, ev->scene);
|
||||
break;
|
||||
}
|
||||
case EVENT_GRID_LAUNCH_SCENE: {
|
||||
struct event_grid_launch_scene *ev =
|
||||
(struct event_grid_launch_scene *)e;
|
||||
jack->getGridLogic()->launchScene(ev->scene);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,12 +29,16 @@
|
|||
|
||||
enum EVENT_ID {
|
||||
EVENT_NOP = 0,
|
||||
/* Track Events */
|
||||
EVENT_TRACK_RECORD_ARM,
|
||||
EVENT_TRACK_VOLUME,
|
||||
EVENT_TRACK_SEND,
|
||||
EVENT_TRACK_SEND_ACTIVE,
|
||||
EVENT_TRACK_JACKSEND,
|
||||
EVENT_TRACK_JACKSEND_ACTIVE,
|
||||
/* Grid Events */
|
||||
EVENT_GRID_PRESS_RELEASE,
|
||||
EVENT_GRID_LAUNCH_SCENE,
|
||||
};
|
||||
|
||||
struct event_track_record_arm {
|
||||
|
@ -64,6 +68,15 @@ struct event_track_send_active {
|
|||
int active;
|
||||
};
|
||||
|
||||
struct event_grid_launch_scene {
|
||||
int scene;
|
||||
};
|
||||
struct event_grid_press_release {
|
||||
int track;
|
||||
int scene;
|
||||
int pressed;
|
||||
};
|
||||
|
||||
/*
|
||||
struct event {
|
||||
enum EVENT_ID event_id;
|
||||
|
|
Loading…
Add table
Reference in a new issue