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.
+15 −13
Diff settings

Always

Just for now

Viewing a subset of changes. View all

ctlra: update API for grid event to have item info

This commit updates the grid info struct definition to
include the physical layout of the grid itself on the
device. Doing so allows the virtualization of grids to
use the co-ordinates otherwise supplied per "item".

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
  • Loading branch information...
harryhaaren committed Aug 30, 2017
commit d815eb156fab79b3b8dc8f44f54f99027350e2dc
View
@@ -105,19 +105,6 @@ struct ctlra_create_opts_t {
typedef const char *(*ctlra_info_get_name_func)(enum ctlra_event_type_t type,
uint32_t control_id);
/** A struct describing the properties of a grid */
struct ctlra_grid_info_t {
/* capabilities of each pad */
/** When non-zero each pad has the capability to show RGB colour.
* When zero, the pad either has no LED, or brightness only */
uint8_t rgb;
uint8_t velocity;
uint8_t pressure;
/* number of pads in x and y direction */
uint32_t x;
uint32_t y;
};
/** Struct that provides physical layout and capabilities about each
* item on the controller. Sizes are provided in millimeters. An item can
* represent a control such as a slider or dial, but also feedback only
@@ -141,6 +128,21 @@ struct ctlra_item_info_t {
uint32_t led_num;
};
/** A struct describing the properties of a grid */
struct ctlra_grid_info_t {
/* capabilities of each pad */
/** When non-zero each pad has the capability to show RGB colour.
* When zero, the pad either has no LED, or brightness only */
uint8_t rgb;
uint8_t velocity;
uint8_t pressure;
/* number of pads in x and y direction */
uint32_t x;
uint32_t y;
/* location of grid itself on the device */
struct ctlra_item_info_t info;
};
#define CTLRA_DEV_TYPE_INVALID 0
#define CTLRA_DEV_TYPE_USB_HID 1
#define CTLRA_DEV_TYPE_BLUETOOTH 2
ProTip! Use n and p to navigate between commits in a pull request.