mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Simplify bailout events in the dive log
I removed the special event type that has been used for bailout events. Bailout events are now just bookmarks with a specific name "e.g. OC, CCR, PSCR). This removes a case where a segmentation error occurred when trying to remove a bailout event from the dive profile. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
parent
27a0542220
commit
c1d04ef7dc
2 changed files with 2 additions and 5 deletions
|
@ -250,7 +250,6 @@ struct event *get_next_divemodechange(struct event **evd)
|
|||
while (ev) { // Step through the events.
|
||||
for (int i=0; i<3; i++) { // For each event name search for one of the above strings
|
||||
if (!strcmp(ev->name,divemode_text[i])) { // if the event name is one of the divemode names
|
||||
ev->type = DIVEMODECHANGE_EVENTTYPE + i;
|
||||
ev->divemode = i; // set the event type to the dive mode
|
||||
*evd = ev->next;
|
||||
return (ev);
|
||||
|
|
|
@ -83,16 +83,14 @@ struct event {
|
|||
/* This is the annoying libdivecomputer format. */
|
||||
int flags, value;
|
||||
/* .. and this is our "extended" data for some event types */
|
||||
enum dive_comp_type divemode;
|
||||
union {
|
||||
enum dive_comp_type divemode; // for divemode change events
|
||||
/*
|
||||
* Currently only for gas switch events.
|
||||
*
|
||||
* NOTE! The index may be -1, which means "unknown". In that
|
||||
* case, the get_cylinder_index() function will give the best
|
||||
* match with the cylinders in the dive based on gasmix.
|
||||
*/
|
||||
struct {
|
||||
struct { // for gas switch events
|
||||
int index;
|
||||
struct gasmix mix;
|
||||
} gas;
|
||||
|
|
Loading…
Reference in a new issue