Add 'string' event type
The event numbers are an indecipherable mess, and Suunto EON Steel has notifications, events and warnings that just don't fit. Plus they really come as strings from the EON Steel anyway. So add a "SAMPLE_EVENT_STRING" type, and for that type the event has a "const char *name" instead of the odd and meaningless flags/value pair. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2e26ae4708
commit
79e2e3b0b5
@ -94,8 +94,12 @@ typedef enum parser_sample_event_t {
|
||||
SAMPLE_EVENT_HEADING,
|
||||
SAMPLE_EVENT_TISSUELEVEL,
|
||||
SAMPLE_EVENT_GASCHANGE2, /* Deprecated: replaced by DC_SAMPLE_GASMIX. */
|
||||
SAMPLE_EVENT_STRING,
|
||||
} parser_sample_event_t;
|
||||
|
||||
/* To let the compile know we have this */
|
||||
#define SAMPLE_EVENT_STRING SAMPLE_EVENT_STRING
|
||||
|
||||
/* For backwards compatibility */
|
||||
#define SAMPLE_EVENT_UNKNOWN SAMPLE_EVENT_FLOOR
|
||||
|
||||
@ -206,6 +210,7 @@ typedef union dc_sample_value_t {
|
||||
struct {
|
||||
unsigned int type;
|
||||
unsigned int time;
|
||||
const char *name;
|
||||
unsigned int flags;
|
||||
unsigned int value;
|
||||
} event;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user