CCR code: Split profile.c into two files, with gas caluclations separate.

This patch implements a separation of the code for gas pressure
calculations from the rest of the code in profile.c. The latter
file is now split into: profile.c and gaspressures.c. The
details of the transferred functions is given at the top of
gaspressures.c. The following chnages were made:
1) dive.h: The function types of calculate_depth_to_mbar
   and depth_to_mbar were made non-static in order to make them
   available within gaspressures.c.
2) profile.c: Prototypes for the functions in gaspressures.c
   were inserted at the top of profile. Ten functions were
   transferred from profile.c to gaspressures.c
3) gaspressures.c as well as a short header, gaspressures.h
   were created.

For the gas pressure calculations for CCR dives, gaspressures.c
forms the immediate basis for further code development.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Willem Ferguson 2014-08-24 20:48:22 +02:00 committed by Dirk Hohndel
parent 214bd0ed6e
commit 7575eb44df
6 changed files with 396 additions and 348 deletions

View file

@ -52,6 +52,12 @@ struct plot_data {
int heartbeat;
int bearing;
};
struct ev_select {
char *ev_name;
bool plot_ev;
};
struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer *dc);
void compare_samples(struct plot_data *e1, struct plot_data *e2, char *buf, int bufsize, int sum);
struct plot_data *populate_plot_entries(struct dive *dive, struct divecomputer *dc, struct plot_info *pi);
@ -60,11 +66,6 @@ void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plo
void calculate_deco_information(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool print_mode);
void get_plot_details_new(struct plot_info *pi, int time, struct membuffer *);
struct ev_select {
char *ev_name;
bool plot_ev;
};
/*
* When showing dive profiles, we scale things to the
* current dive. However, we don't scale past less than