mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Finish Motion in Setsu
This commit is contained in:
parent
698bce8022
commit
88c03aa744
5 changed files with 160 additions and 26 deletions
|
@ -46,7 +46,10 @@ typedef enum {
|
|||
SETSU_EVENT_BUTTON_DOWN,
|
||||
|
||||
/* Event will have dev and button set. */
|
||||
SETSU_EVENT_BUTTON_UP
|
||||
SETSU_EVENT_BUTTON_UP,
|
||||
|
||||
/* Event will have motion set. */
|
||||
SETSU_EVENT_MOTION
|
||||
} SetsuEventType;
|
||||
|
||||
#define SETSU_BUTTON_0 (1u << 0)
|
||||
|
@ -72,8 +75,14 @@ typedef struct setsu_event_t
|
|||
{
|
||||
SetsuTrackingId tracking_id;
|
||||
uint32_t x, y;
|
||||
};
|
||||
} touch;
|
||||
SetsuButton button;
|
||||
struct
|
||||
{
|
||||
float accel_x, accel_y, accel_z; // unit is 1G
|
||||
float gyro_x, gyro_y, gyro_z; // unit is deg/sec
|
||||
uint32_t timestamp; // microseconds
|
||||
} motion;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -90,6 +99,7 @@ const char *setsu_device_get_path(SetsuDevice *dev);
|
|||
uint32_t setsu_device_touchpad_get_width(SetsuDevice *dev);
|
||||
uint32_t setsu_device_touchpad_get_height(SetsuDevice *dev);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue