Reworked the calculate_max_limits and plotted the dive.

Created a new version of calculate_max_limits that doesn't have a
graphics_context and returns a plot_info. The code is basically the same
as the old calculate_max_limits, so there's not much to talk about.

The rest of the code is just boilerplate to plug the Profile
code with the axis and model stuff, to be plotted on screen.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-01-15 13:34:55 -02:00 committed by Dirk Hohndel
parent 52064d9e02
commit dd64f1792d
3 changed files with 104 additions and 1 deletions

View file

@ -43,8 +43,9 @@ struct plot_data {
int stopdepth_calc;
int pressure_time;
};
//TODO: remove the calculatE_max_limits as soon as the new profile is done.
void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer *dc);
struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc, bool print_mode);
int setup_temperature_limits(struct graphics_context *gc);
int get_cylinder_pressure_range(struct graphics_context *gc);