Add support for SAMPLE_EVENT_STRING event type
Instead of having fixed numbers and trying to translate them into strings, a dive computer could just give us the string directly. Like the new EON Steel backend does. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c27ad52be4
commit
a0aaadd50b
@ -235,6 +235,10 @@ static void handle_event(struct divecomputer *dc, struct sample *sample, dc_samp
|
||||
name = QT_TRANSLATE_NOOP("gettextFromC", "invalid event number");
|
||||
if (type < nr_events)
|
||||
name = events[type];
|
||||
#ifdef SAMPLE_EVENT_STRING
|
||||
if (type == SAMPLE_EVENT_STRING)
|
||||
name = value.event.name;
|
||||
#endif
|
||||
|
||||
time = value.event.time;
|
||||
if (sample)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user