mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Implement get_divemode() to find the divemode at a particular time
Replaced a rather cumbersome function that that did the above. Upon the suggestion of Robert Helling who proposed a much shorter way, this new function replaced the previous ones. This necessitated changes to divelist.c, profile.c and plannernotes.c, as well as dive.c/h. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
parent
b9174332d5
commit
cad4eb39c4
5 changed files with 28 additions and 62 deletions
|
@ -362,6 +362,7 @@ struct dive_components {
|
|||
unsigned int weights : 1;
|
||||
};
|
||||
|
||||
extern enum dive_comp_type get_current_divemode(struct divecomputer *dc, int time, struct event **evp, enum dive_comp_type *divemode);
|
||||
extern struct event *get_next_divemodechange(struct event **evd, bool update_pointer);
|
||||
extern enum dive_comp_type get_divemode_at_time(struct divecomputer *dc, int dtime, struct event **ev_dmc);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue