Calculate dive maxima/minima independent of dive computer

This splits the dive time, depth, pressure and temperature maxima and
minima setup from the per-dive-computer "create_plot_info()" function
into one setup function that walks _all_ the dive computers, so that we
have a global maxima and minima.

That way the graph scaling we set up will now fit the data from all dive
computers rather than just the particular one we are plotting.  So if
you switch back-and-forth between computers, the scale (which is defined
by the extremes) remains the same.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2012-12-09 16:54:16 -08:00 committed by Dirk Hohndel
parent febcbd6325
commit c6ca263fb0
2 changed files with 79 additions and 40 deletions

View file

@ -16,8 +16,8 @@ struct plot_info {
int nr;
int maxtime;
int meandepth, maxdepth;
int endpressure, maxpressure;
int mintemp, maxtemp, endtemp;
int minpressure, maxpressure;
int mintemp, maxtemp;
double endtempcoord;
gboolean has_ndl;
struct plot_data *entry;