Commit graph

66 commits

Author SHA1 Message Date
Linus Torvalds
e88695ff72 Do cylinder pressure plot first, then depth, then text notes
Text notes need to be last, so that they don't get stepped on by the
other graph elements.

Also, separate the depth text plot out into a function of its own.
Tidier that way.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-06 12:36:52 -07:00
Linus Torvalds
c0a429457a Tweak the "show depth in text" heuristic a bit
Use a 10-minute window *or* when the depth has reversed sufficiently to
make the max we've found interesting.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-06 12:16:39 -07:00
Linus Torvalds
3b67a3ecb4 Plot some numerical depth markers
Add some actual numbers to the depth plot too.  Do it by finding the
deepest points (within a five-minute rolling window), and show the
depths of those points.

Sure, we could have just labeled the depth markers, but this seems
nicer. But what do I know - I'm not exactly famous for my GUI design.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-06 10:25:01 -07:00
Dirk Hohndel
d4db3e938b Fix drawing artifact with UEMIS xml data
Only draw the pressure line to the final data point
(duration / end.mbar) if we haven't already drawn samples
past that point (as the UEMIS records pressure data for a
number of additional samples after the actual dive has ended)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
[ Changed to use 'last actual drawn sample time that had pressure
  data' instead of 'last sample time'  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-06 07:30:48 -07:00
Nathan Samson
21204926df Open File works. I refactored the code and introduced a new type. I never used it as a pointer (their was no real reason), but I'm not really satisfied.
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-05 21:12:58 +02:00
Linus Torvalds
5f79a804b9 Sanitize and fix cylinder pressure overview
Doing per-dive cylinder start/end pressures is insane, when we can have
up to eight cylinders.  The cylinder start/end pressure cannot be per
dive, it needs to be per cylinder.

This makes the save format cleaner too, we have all the cylinder data in
just one place.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-05 09:12:54 -07:00
Nathan Samson
6138d151e9 Remove the redundant frames in the notebook. Closes #9
Signed-off-by: Nathan Samson <nathansamson@gmail.com>
2011-09-04 19:01:30 +02:00
Linus Torvalds
b176daf6d6 Do better cylinder information management
Instead of just tracking gasmix, track the size and workng pressure of
the cylinder too.

And use "cylinder" instead of "tank" throughout.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03 20:31:18 -07:00
Linus Torvalds
c1bed52a77 Add 'mean depth' marker on dive plot
Just because I can.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03 13:55:36 -07:00
Linus Torvalds
1e75ceac0d Add various dive fixups, and show pressure (if any) in the plot
Now the dive profile plot *really* needs some units.  The pressure is
just a random line otherwise.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-03 13:19:26 -07:00
Linus Torvalds
968aa28155 Do something half-way sane (no SIGSEGV) when there are no dives
It just leaves ugly blank areas, but whatever.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 16:40:22 -07:00
Linus Torvalds
ee56021dfb dive profile plot: use saner minimum limits
The time minimum was in seconds, not minutes, and we really do want to
show at least to 90ft to make shallow dives look shallow rather than
scaled to some full depth.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 14:35:31 -07:00
Linus Torvalds
059f047788 plot a fancier 'filled' depth profile
Now I'm just dicking around with cairo.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 14:23:35 -07:00
Linus Torvalds
eed9538101 Plot dive profile slightly more intelligently.
This actually creates a bounding box and some scale markers.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 14:15:50 -07:00
Linus Torvalds
2044dabc81 Teach the thing to actually track the currently selected dive
.. and repaint the profile when the selection changes.

Now, if it just wasn't so ugly, it might even be useful.  Except it
obviously needs to also show all the other dive information.  And allow
the user to fill in details.  And save the end results.

So no, it's not useful.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 11:07:31 -07:00
Linus Torvalds
8e95ded57b Split up profile frame generation into its own file.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-31 10:20:46 -07:00