]> git.tdb.fi Git - ext/subsurface.git/log
ext/subsurface.git
12 years agoCorrectly plot the tank end pressure if it was set manually
Dirk Hohndel [Sat, 19 Nov 2011 20:47:07 +0000 (12:47 -0800)]
Correctly plot the tank end pressure if it was set manually

While printing the last pressure in the calculated sequence may seem more
logical, given that the discrete series will create some amount of error
this simply looks wrong. Instead we pick the end pressure that was
manually set.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMake pressure plot shading by sac rate consistent
Dirk Hohndel [Sat, 19 Nov 2011 19:43:37 +0000 (14:43 -0500)]
Make pressure plot shading by sac rate consistent

Some parts of the existing code used the depth at the time of the sample
to calculate the sac rate - it makes much more sense to use the average
depth. But that requires us to loop over the entries and average the
individual sac rates per segment instead of just using the beginning and
end depth of the multi-segment interval we use for smoothing purposes.

This may seem like a subtle detail, but it does in fact matter when we
plot the synthetic tank pressure values that we create when we have no
tank pressure data in the samples.

Another detail we change here is to not artificially start with a forward
looking segment of the full SAC_WINDOW but instead just start with the
first two data points and then simply let the time window grow until it
hits SAC_WINDOW - at which point it becomes a sliding window.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoImprove tank pressure sac coloring
Dirk Hohndel [Sat, 19 Nov 2011 19:39:35 +0000 (14:39 -0500)]
Improve tank pressure sac coloring

This changes the algorithm that picks the sac color to consider
+/- 1 l/min to be the same color (before the color changed every
time you crossed above or below the average which looked silly with
our synthetic "constant sac" values as those are discrete and oscilate
around the average.

This also changes the order in which things are drawn so so that the
pressure plot goes over the depth profile plot (so the red shading of the
dive no longer changes the color of the tank pressure plot).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoBe more consistent in our handling of rgb value tables
Dirk Hohndel [Sat, 19 Nov 2011 15:17:19 +0000 (10:17 -0500)]
Be more consistent in our handling of rgb value tables

Use rgb_t for the sac colors, create a new set_source_rgb_struct function
and use that for the velocity values (in the depth plot) as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoRemove redundant linear sample tank pressure data
Dirk Hohndel [Sat, 19 Nov 2011 12:09:14 +0000 (07:09 -0500)]
Remove redundant linear sample tank pressure data

I've seen at least DivingLog do this. If you manually enter beginning and
end pressure for a tank it will either linearize the samples in between or
offer to simulate a dive (with constant SAC rate). At least the first case
is reasonably easy to detect. We throw out those samples and ensure that
we still have valid beginning and end pressure for that dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'sacplot' of git://github.com/dirkhh/subsurface
Linus Torvalds [Fri, 18 Nov 2011 12:14:37 +0000 (10:14 -0200)]
Merge branch 'sacplot' of git://github.com/dirkhh/subsurface

* 'sacplot' of git://github.com/dirkhh/subsurface:
  Color tank pressure plot based on relative sac

12 years agoColor tank pressure plot based on relative sac
Dirk Hohndel [Fri, 18 Nov 2011 11:57:49 +0000 (09:57 -0200)]
Color tank pressure plot based on relative sac

Linus suggested that instead of using absolute SAC values to base the
color on (which forced us to pre-define which SAC rates are green and
which are red) we should color the tank pressure plot relative to the avg
SAC rate of that dive - which I think makes the coloring much more useful
to spot when on your dive you were doing well and when you were not.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'sacplot' of git://github.com/dirkhh/subsurface
Linus Torvalds [Thu, 17 Nov 2011 20:38:46 +0000 (18:38 -0200)]
Merge branch 'sacplot' of git://github.com/dirkhh/subsurface

* 'sacplot' of git://github.com/dirkhh/subsurface:
  Color pressure plot according to current SAC rate
  Fix minor coding standard issues introduced by my last commit

12 years agoColor pressure plot according to current SAC rate
Dirk Hohndel [Thu, 17 Nov 2011 02:34:50 +0000 (00:34 -0200)]
Color pressure plot according to current SAC rate

Similar to color indicating vertical speed in the profile plot we now use
color in the tank pressure plot to indicate current SAC rate.

We use a 45 sec sliding window to make sure we cover at least two breaths
for each current SAC sample to avoid artificial oscillation based on
breathing rhythm for corputers with high sample resolution.

Not sure about the color coding that I'm using right now - it's green-ish
for SAC rates under 15l/min ~= .55cuft/min and turns yellow and red as you
go higher. That seems to work well for me, but for other divers this may
be way off (or at least not as useful). Maybe this should be configurable?
This is a lot more diver specific than the vertical velocity where there
are clear recommendations based on safety considerations on what is good
and bad.

As a side effect, this removes the color coding that showed you whether
you were looking at pressure data from samples (green) vs. interpolated
pressure data (yellow). Not sure if people really want to see that. We
might be able to indicate this differently (I am thinking different line
width or transparency or something along those line)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoRemove redundant duplicate pressure samples
Linus Torvalds [Thu, 17 Nov 2011 14:03:11 +0000 (12:03 -0200)]
Remove redundant duplicate pressure samples

At least the Suunto pressure transmitter seems to be pretty
"quantisized", and it will send identical samples for a while until the
pressure changes enough.  Then subsurface gives this silly flat line
with a sudden jump downwards, which *could* be you suddenly taking a
deep breath after holding it for a while, but almost certainly it's a
sensor issue.

So just remove successive identical pressure readings.  They aren't
interesting, and subsurface will actually do a good job of interpolating
it according to SAC rate instead.  And they just make the XML look
worse.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoShow dives "latest-first" by default
Linus Torvalds [Wed, 16 Nov 2011 18:30:34 +0000 (16:30 -0200)]
Show dives "latest-first" by default

You can still order them by date by just setting the sort order on the
date column, but normally you'd be more interested in the most recent
dives.

I tried to just scroll down to the last ones automatically instead, but
gtk makes that *really* hard to do.  If you do it in the natural place
for it, the scroll bar wll show up later and then cover up the last
entry anyway.  So you'd have to do some crazy expose event thing or
something.  Which may be the right thing to do eventually anyway, but
not worth the pain right now.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoShow more of the dive location in the dive list
Linus Torvalds [Wed, 16 Nov 2011 18:29:38 +0000 (16:29 -0200)]
Show more of the dive location in the dive list

Randomly picked up to 60 characters.  But maybe we should just get rid
of the limit entirely.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix minor coding standard issues introduced by my last commit
Dirk Hohndel [Sun, 13 Nov 2011 17:51:34 +0000 (15:51 -0200)]
Fix minor coding standard issues introduced by my last commit

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'forlinus' of git://github.com/dirkhh/subsurface
Linus Torvalds [Sun, 13 Nov 2011 17:41:05 +0000 (15:41 -0200)]
Merge branch 'forlinus' of git://github.com/dirkhh/subsurface

* 'forlinus' of git://github.com/dirkhh/subsurface:
  Make sure SAC and OTU get recalculated after cylinder info was changed

12 years agoMake sure SAC and OTU get recalculated after cylinder info was changed
Dirk Hohndel [Sun, 13 Nov 2011 17:29:07 +0000 (15:29 -0200)]
Make sure SAC and OTU get recalculated after cylinder info was changed

Also fixed minor coding style issues (prevent useless code from being
executed).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoFix the stupid gtk combo box text reset issue for real
Linus Torvalds [Sun, 13 Nov 2011 17:17:38 +0000 (15:17 -0200)]
Fix the stupid gtk combo box text reset issue for real

Lubomir's solution to fill them with a newline doesn't work.  Well, it
may work on some versions of gtk, but on mine it just results in an ugly
box for the control character '000a' that tries to show the newline.

So this is a third approach: if we reset the text to empty, first set it
to space (to clear it), and then set it to empty.  That seems to work on
at least one version of gtk, and doesn't have the problem with the space
*remaining* when you cut-and-paste something into the combo box.

Let's see if it breaks anything else, but at worst it should be no worse
than the old "set it to space" approach - iow the combo box might
remember the space, but at least not some random data from the previous
dive that it happened to show.

Lovely gtk bugs.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agogtk_combo_box_entries and empty text
Lubomir I. Ivanov [Thu, 3 Nov 2011 20:44:04 +0000 (22:44 +0200)]
gtk_combo_box_entries and empty text

Passing -1 to gtk_combo_box_set_active, seems not to work as the gtk
documentation explains; there might be a bug in the library or some
special case that is not explained.

could be related to:
  http://mail.gnome.org/archives/gtk-devel-list/2004-March/msg00170.html

passing \n seems to "trick" the cell renderer to clear the entry
completely.  This is a temporary solution.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoSave cylinder O2/He content after the cylinder type description
Linus Torvalds [Thu, 10 Nov 2011 23:42:37 +0000 (21:42 -0200)]
Save cylinder O2/He content after the cylinder type description

This changes the save format xml to be a bit more readable: instead of
putting the gasmix first, put the cylinder type (size, workpressure and
description) first, then gasmix, then pressure details.

It makes no difference for machine parsing, but I think it's a lot more
logical for humans that actually look at the xml file.  And we really do
want to make the xml file readable by humans.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMake the sample-vs-cylinder pressure check more liberal
Linus Torvalds [Thu, 10 Nov 2011 23:33:38 +0000 (21:33 -0200)]
Make the sample-vs-cylinder pressure check more liberal

This makes it consider them to be identical if they are within half a
bar of each other.  If you edit the pressures by hand and set them to
the same bar pressure as the samples, they may not be identical to the
last milli-bar, but clearly the manually entered cylinder pressure isn't
significantly different from the sample data, so consider it redundant.

We do want manual overrides of cylinder pressures to take precedence
over sample data (as Dirk so eloquently puts it, some dive computers
really don't have very reliable sample data), but at the same time the
sample data is the one we are expecting to be fairly accurate.  The
starting and ending pressure overrides are for when there is no sample
data, or when the sample data is totally wrong for some reason.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoThis should fix the missing end pressure for broken dive computers
Dirk Hohndel [Thu, 10 Nov 2011 01:15:48 +0000 (20:15 -0500)]
This should fix the missing end pressure for broken dive computers

Some dive computers randomly drop samples. That was no problem unless it
was the LAST sample. We work around that now

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoRemove unused 'minpressure/endpressure' fields from plot info
Linus Torvalds [Thu, 10 Nov 2011 00:37:18 +0000 (19:37 -0500)]
Remove unused 'minpressure/endpressure' fields from plot info

.. and fix the maxpressure to actually look at *all* the cylinders, so
that if you don't have sample data, but rely onmanually set cylinder
pressures, it now really is the max of all the cylinders.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'bugfixes' of git://github.com/dirkhh/subsurface
Linus Torvalds [Thu, 10 Nov 2011 00:23:59 +0000 (19:23 -0500)]
Merge branch 'bugfixes' of git://github.com/dirkhh/subsurface

* 'bugfixes' of git://github.com/dirkhh/subsurface:
  Fix breakage caused by Linus' changes to tank pressure handling

12 years agoFix breakage caused by Linus' changes to tank pressure handling
Dirk Hohndel [Thu, 10 Nov 2011 00:15:28 +0000 (19:15 -0500)]
Fix breakage caused by Linus' changes to tank pressure handling

We no longer look at the start and end pressure for a tank, if the tank
has valid pressure data in its samples (which makes sense). Sadly that
breaks the current pressure interpolation code. With this patch most of
those problems should be fixed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'testdata' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 9 Nov 2011 23:24:09 +0000 (18:24 -0500)]
Merge branch 'testdata' of git://github.com/dirkhh/subsurface

* 'testdata' of git://github.com/dirkhh/subsurface:
  Improve temperature text plotting in profile display

12 years agoImprove temperature text plotting in profile display
Dirk Hohndel [Wed, 9 Nov 2011 21:01:11 +0000 (13:01 -0800)]
Improve temperature text plotting in profile display

- make the text a lighter color so it stands out more
- change the heuristic when we print text to include both relative change
  in temperature and time since the last text was printed
- print the first temperature we encounter
- allow an ending temperature to be printed if the last printed
  temperature was before the 75% mark of the dive

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'testdata' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 9 Nov 2011 18:31:06 +0000 (12:31 -0600)]
Merge branch 'testdata' of git://github.com/dirkhh/subsurface

* 'testdata' of git://github.com/dirkhh/subsurface:
  Correctly plot dives ending below the surface

12 years agoAdd "enable" button for manual pressure setting
Linus Torvalds [Wed, 9 Nov 2011 16:51:20 +0000 (08:51 -0800)]
Add "enable" button for manual pressure setting

This grays out the pressure settings in the cylinder editing widget if
the pressure data has been taken from the samples.  You can still
manually override the data, but you now need to enable that manual
override explicitly.

This makes the semantics of editing start/end pressures of dives with
pressure sample data a bit more intuitive, I think.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoKeep the start/end spinbuttons as GtkWidget
Linus Torvalds [Wed, 9 Nov 2011 16:37:49 +0000 (08:37 -0800)]
Keep the start/end spinbuttons as GtkWidget

For graying things out, we want a widget, not a spinbutton.  Although
I'm sure we could just cast things back and forth.  But let's be
consistent with what we do, and only ever cast from GtkWidget to
GtkSpinButton, and have the same logic as for the "o2" widget that also
needs to be explicitly enabled.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoequipment: clean up cylinder pressure spinbutton setup
Linus Torvalds [Wed, 9 Nov 2011 16:33:13 +0000 (08:33 -0800)]
equipment: clean up cylinder pressure spinbutton setup

This is just in case I end up doing the graying out of implicit pressure
information: I wanted to clean things up a bit first.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoShow the newly split pressures correctly in the equipment page too
Linus Torvalds [Wed, 9 Nov 2011 16:21:48 +0000 (08:21 -0800)]
Show the newly split pressures correctly in the equipment page too

NOTE! When *editing* the cylinder data, the only thing shown is the
non-sample pressure.  So the cylinder editing widget will show zero for
start/end pressure for a dive that has pressure saples without any
manually set pressure data.

This is intentional, so that you can clearly see that this is not a set
value.  But it may be that we should gray out the spinputton and have an
"edit value" checkbox or something to make it really obvious.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix up the statistics page use of pressure data
Linus Torvalds [Wed, 9 Nov 2011 16:06:17 +0000 (08:06 -0800)]
Fix up the statistics page use of pressure data

The statistics page calculates air use separately, and also needs to be
fixed up for the split of the pressures into sample-vs-start/end.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix up air use calculations for new pressure handling
Linus Torvalds [Wed, 9 Nov 2011 15:51:00 +0000 (07:51 -0800)]
Fix up air use calculations for new pressure handling

Make sure that we calculate air use by using the proper start/end
pressures, with the manually set ones being used preferentially over any
possible sample data.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDon't save cylinder start/end pressures unless set by hand
Linus Torvalds [Wed, 9 Nov 2011 15:37:25 +0000 (07:37 -0800)]
Don't save cylinder start/end pressures unless set by hand

Keep the sample pressure start/end data separate from the overall
cylinder start/end data - and clean the overall cylinder start/end data
if it matches the samples exactly to avoid the redundancy.

This breaks all the SAC calculations etc, which expect the cylinder
pressures to always be in the cylinder data.  I'll fix that up
separately.

The reason for this is that we really want to keep the manually entered
data separate: the pressure plotting doesn't need the confusion, and
considers end-point data (with interpolation) very different from sample
data.  Also, we do not want to pollute the xml save-file with data that
is computed.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoIf we don't have cylinder working pressure, we sill want to show the volume
Linus Torvalds [Wed, 9 Nov 2011 15:56:07 +0000 (07:56 -0800)]
If we don't have cylinder working pressure, we sill want to show the volume

.. although in that case we can only ever show the volume in liters, and
cannot do a conversion to cubic feet even if the user has set imperial
units.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoCorrectly plot dives ending below the surface
Dirk Hohndel [Wed, 9 Nov 2011 15:41:41 +0000 (07:41 -0800)]
Correctly plot dives ending below the surface

I thought we had fixed this before - but I guess it got broken again
somewhere. We now make sure that the plot_info ends on an entry with
depth 0.

Added test14 to verify the fix.

Also fixed cut'n'paste errors in a few test dive files.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agodon't use strftime() due to locale issues
Lubomir I. Ivanov [Mon, 7 Nov 2011 05:33:49 +0000 (07:33 +0200)]
don't use strftime() due to locale issues

Make statistics.c use snprintf() with weekday(), monthname() instead of
strftime().  The mingw strftime() ends up having lots of problems at
least on Windows unless you set the locale just right, so just avoid the
problem by doing the simple function by hand.  We already did that in
other places anyway.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMake the xslt style sheet finding search a set of possible paths
Linus Torvalds [Sat, 5 Nov 2011 20:51:37 +0000 (13:51 -0700)]
Make the xslt style sheet finding search a set of possible paths

This allows us to install the xslt files in multiple places.  Right now
the path defaults to the subsurface xslt install directory, the relative
directory "xslt" and the current working directory.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoUse XSLT file to open JDiveLog logs
Miika Turkia [Sat, 5 Nov 2011 10:39:17 +0000 (12:39 +0200)]
Use XSLT file to open JDiveLog logs

Open JDiveLog files by translating them to subsurface format using XSLT.
These files are identified by the name of the first element (JDiveLog)
and transform is applied to only these.

The XSLT feature is compiled in only if libxslt is installed. The
transformation files are installed globally in Linux under
/usr/share/subsurface/xslt. Windows and OSX still need appropriate Makefile
changes and testing.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix missing pressure plot at start of the dive in some situations
Dirk Hohndel [Fri, 4 Nov 2011 22:34:30 +0000 (15:34 -0700)]
Fix missing pressure plot at start of the dive in some situations

In some situations we could end up with no sample pressure and no
interpolated pressure at time = 0. This is now fixed.

Fix notes in test dive the exposed the issue.

Also change the code in create_plot_info to keep the number of samples and
the number of corresponding pi entries in separate variables. This avoids
future changes from breaking if they assume they can access
dive->sample[nr_samples - 1] (which is a reasonable assumption to make).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoDon't test for liquid Helium
Dirk Hohndel [Fri, 4 Nov 2011 22:09:56 +0000 (15:09 -0700)]
Don't test for liquid Helium

Simply accept temperatures that are above absolute zero.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoUpdate test dives
Dirk Hohndel [Fri, 4 Nov 2011 21:54:22 +0000 (14:54 -0700)]
Update test dives

The notes now reflect things that were fixed in the last commits.
Also added more test dives to test other boundary cases.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoImprove tank pressure plot for computers that create "gaschange" events
Dirk Hohndel [Fri, 4 Nov 2011 21:32:15 +0000 (14:32 -0700)]
Improve tank pressure plot for computers that create "gaschange" events

This was exposed by the test dives, but it shows up in small ways with
real dives from some dive computers like the Suunto Vyper Air.

We now insert synthetic plot_info entries that match the gas change event;
to make this look smoother we insert either two events (one for the old
tank, one a second later for the new tank) if there is no sample at the
time of the event, or one additional event (and move the real sample back
by one second) if there is a sample at the time of the event.

This does expose another issue with some dives from Linus' computer where
the pressure in the samples dips below the end pressure noted for the tank
- which creates an odd "yellow up-tick" at the end of using the first tank
in the plot. Maybe we should not insert a synthetic "last of old tank"
event if we have a sample with valid pressure in the last NN seconds
before the gas change?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoDon't repeat redundant minima or maxima in the profile plot
Dirk Hohndel [Fri, 4 Nov 2011 21:25:20 +0000 (14:25 -0700)]
Don't repeat redundant minima or maxima in the profile plot

If we have more than four identical depth readings, the old code would see
those as local maxima and minima and print spurious depth values in the
profile plot.

Yes, in real sample data identical readings won't happen - but in
synthetic data they can and there this looks really bogus.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoClear O2/H2 field if there is no tank information
Dirk Hohndel [Fri, 4 Nov 2011 18:00:03 +0000 (11:00 -0700)]
Clear O2/H2 field if there is no tank information

Found using the new test dives

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoDon't display a water temperature of absolute 0 in info/stats page
Dirk Hohndel [Fri, 4 Nov 2011 17:57:26 +0000 (10:57 -0700)]
Don't display a water temperature of absolute 0 in info/stats page

Found using the new test dives

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoReplace Linus' dives with useful test dives that help test the app
Dirk Hohndel [Fri, 4 Nov 2011 17:47:38 +0000 (10:47 -0700)]
Replace Linus' dives with useful test dives that help test the app

As much as Linus' dives may be fun to look at, they don't help us test the
app. Writing these test dives I already found a couple of bugs - and I'm
just getting started.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoWork around some gtk oddity with gtk_combo_box_entries and empty text
Linus Torvalds [Thu, 3 Nov 2011 05:11:31 +0000 (22:11 -0700)]
Work around some gtk oddity with gtk_combo_box_entries and empty text

Setting the gtk_combo_box_entry test to th eempty string doesn't "take":
the old text remains.  Which does all kinds of funky things when you
switch between dives, and the location (or buddy or divemaster) entry
contains some random stale entry from another dive.

This works around it by using a string with a single space in it
instead, and then removing the space when reading.  Not pretty, and
certainly not correct, but it pinpoints the odd behavior.  I'm sure
somebody will figure out what the magic gtk incantation is for this.

Also remove the never-used flags for whether the entries have changed.
They were designed to be set by change callbacks, but we never bothered
with it, and just always read the value of the entries instead.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 2 Nov 2011 23:49:33 +0000 (16:49 -0700)]
Merge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface

* 'add-info-stats-page' of git://github.com/dirkhh/subsurface:
  Exclude obviously bogus SAC values from statistics calculations

12 years agoExclude obviously bogus SAC values from statistics calculations
Dirk Hohndel [Wed, 2 Nov 2011 22:31:41 +0000 (15:31 -0700)]
Exclude obviously bogus SAC values from statistics calculations

Random cutoff is 2.8l/min (or about 0.1cuft/min)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'drag-n-drop-fix' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 2 Nov 2011 21:43:07 +0000 (14:43 -0700)]
Merge branch 'drag-n-drop-fix' of git://github.com/dirkhh/subsurface

* 'drag-n-drop-fix' of git://github.com/dirkhh/subsurface:
  Fix drag and drop error

12 years agoFix drag and drop error
Dirk Hohndel [Wed, 2 Nov 2011 21:35:47 +0000 (14:35 -0700)]
Fix drag and drop error

Linus noted an odd "CRITICAL" warning when ripping off a page of the
notebook and then dropping it within the same notebook.

Turns out we need to simply accept a drop on ourselves and gtk does the
rest correctly.

I also fixed the fact that we incorrectly declared the callback as 'void'.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 2 Nov 2011 21:20:28 +0000 (14:20 -0700)]
Merge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface

* 'add-info-stats-page' of git://github.com/dirkhh/subsurface:
  Fix typo that broke min SAC calculation
  Surface interval is calculated from the END of previous dive

12 years agoFix typo that broke min SAC calculation
Dirk Hohndel [Wed, 2 Nov 2011 20:30:49 +0000 (13:30 -0700)]
Fix typo that broke min SAC calculation

Actually more of a cut'n'paste-o

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoSurface interval is calculated from the END of previous dive
Dirk Hohndel [Wed, 2 Nov 2011 20:27:25 +0000 (13:27 -0700)]
Surface interval is calculated from the END of previous dive

Silly mistake

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface
Linus Torvalds [Wed, 2 Nov 2011 19:39:55 +0000 (12:39 -0700)]
Merge branch 'add-info-stats-page' of git://github.com/dirkhh/subsurface

* 'add-info-stats-page' of git://github.com/dirkhh/subsurface:
  Add Info & Stats page to the notebook
  Even more places with pressure and volume conversions
  Further cleanup of pressure and volume conversions
  Use unit functions to get column headers, add unit function for pressure
  More consistency improvements
  Add new helper function to get temperature and unit

12 years agoAdd Info & Stats page to the notebook
Dirk Hohndel [Wed, 2 Nov 2011 16:10:57 +0000 (09:10 -0700)]
Add Info & Stats page to the notebook

This provides the relevant information for the currently selected dive
plus a bunch of statistics over all dives in the dive_table.

The visual design has lots of room for improvement
- right now the different fields change size
- it might be nice to have a more modern look for the entries
- the O2/He field is odd - for most divers the He value will
  always be 0, so maybe we should only show He if there's at least one
  dive that uses He? Also, we simply do a comma separated list of gases
  for all the tanks used

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoEven more places with pressure and volume conversions
Dirk Hohndel [Wed, 2 Nov 2011 04:12:21 +0000 (21:12 -0700)]
Even more places with pressure and volume conversions

Amazing at how many spots we are re-implementing the wheel.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoFurther cleanup of pressure and volume conversions
Dirk Hohndel [Wed, 2 Nov 2011 04:00:46 +0000 (21:00 -0700)]
Further cleanup of pressure and volume conversions

I'm amazed at how many spots we were doing conversions - some of them
subtly different than others.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoUse unit functions to get column headers, add unit function for pressure
Dirk Hohndel [Wed, 2 Nov 2011 03:13:14 +0000 (20:13 -0700)]
Use unit functions to get column headers, add unit function for pressure

Finally getting more consistent overall in how we convert between the
different units and how we decide which units to display.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMore consistency improvements
Dirk Hohndel [Wed, 2 Nov 2011 02:56:14 +0000 (19:56 -0700)]
More consistency improvements

Treat SAC and OTU consistently:
- SAC is now a member of struct dive
- it's calculated / populated at the same time with a helper function with
  consistent API

Create get_volume_units function that returns volumes (e.g. used in SAC
rates) based on preferred units - make sure we have these conversions just
once in the code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoAdd new helper function to get temperature and unit
Dirk Hohndel [Tue, 1 Nov 2011 18:39:52 +0000 (11:39 -0700)]
Add new helper function to get temperature and unit

Designed along the lines of get_depth_units - except we don't define a
specific number of digits to show.

Use this in the one spot we need it right now in profile.c

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoFix 'init_ui()' so that it can change argc/argv
Linus Torvalds [Wed, 2 Nov 2011 00:09:15 +0000 (17:09 -0700)]
Fix 'init_ui()' so that it can change argc/argv

That's what gtk_init() does with gtk-specific arguments.  IOW, if you do
things like

   subsurface --g-fatal-warnings dives.xml

to get a real abort on gtk warnings, gtk_init needs to be able to
actually change argc/argv.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoUsing RegQueryValueEx instead of RegGetValue
Lubomir I. Ivanov [Mon, 31 Oct 2011 01:12:51 +0000 (03:12 +0200)]
Using RegQueryValueEx instead of RegGetValue

Provides compatibility with winxp-32bit in gtk-gui.c,
since RegGetValue is only available on the 64bit build of the OS.

Fixed whitespace issues, fixed obvious typo (this patch clearly wasn't
even compile tested)

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agowin32/nsi: added confirmation to store registry settings
Lubomir I. Ivanov [Mon, 31 Oct 2011 01:53:37 +0000 (03:53 +0200)]
win32/nsi: added confirmation to store registry settings

a yes/no dialog to clear or store data in HKCU "SOFTWARE\subsurface"
"Do you wish to store subsurface's settings?"

fixed small whitespace issue

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'macosx-app-bundle-1' of git://github.com/henrik242/subsurface
Linus Torvalds [Tue, 1 Nov 2011 00:12:59 +0000 (17:12 -0700)]
Merge branch 'macosx-app-bundle-1' of git://github.com/henrik242/subsurface

* 'macosx-app-bundle-1' of git://github.com/henrik242/subsurface:
  Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable.
  Ignore process serial number argument when run as native MacOSX app
  Add basic MacOSX app bundle install target

12 years agoAdd Debian packaging
Roland Dreier [Mon, 31 Oct 2011 20:05:56 +0000 (13:05 -0700)]
Add Debian packaging

Add support for building .deb packages; to use, one can do

    $ cp -r packaging/debian debian
    $ dpkg-buildpackage -b

This of course requires a libdivecomputer package as a build prerequisite.

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDon't run gtk-update-icon-cache if DESTDIR is set
Roland Dreier [Mon, 31 Oct 2011 20:05:55 +0000 (13:05 -0700)]
Don't run gtk-update-icon-cache if DESTDIR is set

We don't want to run gtk-update-icon-cache during a package build, when
we're installing into a staging directory just to create a tree that will
be packaged up and really installed later.  The standard heuristic seems
to be to skip gtk-update-icon-cache if DESTDIR is set (ie we're installing
to a different location than we're configured to run from).

Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoUse the new packaging directory for MacOSX specific files, and provide shell script...
Henrik Brautaset Aronsen [Sun, 30 Oct 2011 21:27:33 +0000 (22:27 +0100)]
Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable.

- Make use of the new packaging directory.
- Set a current directory for subsurface to find the svg icon.  There might be a pretter solution to this.
- Somehow subsurface doesn't behave properly in the Dock.  Running it in the background without Dock integration until we figure out why.

Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
12 years agoIgnore process serial number argument when run as native MacOSX app
Henrik Brautaset Aronsen [Sun, 30 Oct 2011 19:56:28 +0000 (20:56 +0100)]
Ignore process serial number argument when run as native MacOSX app

The subsurface binary is invoked with a -psn_x_xxxxxx argument when started from
a native MacOSX app bundle.

Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
12 years agoAdd basic MacOSX app bundle install target
Henrik Brautaset Aronsen [Sun, 16 Oct 2011 21:16:36 +0000 (23:16 +0200)]
Add basic MacOSX app bundle install target

Native MacOSX app bundles are installed in /Applications.  We want a separate
install target for this, since some would probably prefer the regular unixy
way.

Signed-Off-By: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
12 years agoXSLT to transform JDiveLog to Subsurface format
Miika Turkia [Sun, 30 Oct 2011 17:47:29 +0000 (19:47 +0200)]
XSLT to transform JDiveLog to Subsurface format

XSLT file to transfer dive logs from JDiveLog format to Subsurface
format. It can be used on command line with the following syntax:
xsltproc <divelog.jlb> > <divelog.xml>

Basic functionality such as depth readings and dive information is
currently supported. However, this is only tested in metric units.

What is currently missing is at least tank changes and tank pressure (as
no sample data was available).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'mingw-port-cleanup' of git://github.com/dirkhh/subsurface
Linus Torvalds [Sat, 29 Oct 2011 23:11:59 +0000 (16:11 -0700)]
Merge branch 'mingw-port-cleanup' of git://github.com/dirkhh/subsurface

* 'mingw-port-cleanup' of git://github.com/dirkhh/subsurface:
  Fix Windows install destination
  Get rid of the terminal window that is displayed under Windows
  Add first cut of the mingw cross build spec file + nsi file
  Get icons working correctly under Windows

12 years agoFix up end conditions for dives
Linus Torvalds [Sat, 29 Oct 2011 22:57:26 +0000 (15:57 -0700)]
Fix up end conditions for dives

We used to have the dive plot have two "filler" entries at the beginning
and the end, and indeed that is how they are allocated.  However, we fix
up "pi->nr" later to be "lastindex+1", where "lastindex" is the index of
the time we surface.

So when we loop over the plot entries, we actually need to loop all the
way to the end: use "i < pi->nr" instead of "i < pi->nr-2".

We still do have the two extra filler entries at the beginning, though.
So depending on the loop, we might want to start at entry 2.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoPlot fake profile for non-sample dives
Linus Torvalds [Sat, 29 Oct 2011 21:09:27 +0000 (14:09 -0700)]
Plot fake profile for non-sample dives

Right now it just plots something ridiculous, the code is really just
meant to be an example.  We migth be able to plot a traditional
staircase plot and make it look somewhat saner by taking mean depth into
account (if it exists).

Right now it just plots a (skewed) rectangular dive profile using the
max depth and total time. Which is obviously insane.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix use of uninitialized variable if there are no samples
Linus Torvalds [Sat, 29 Oct 2011 20:24:56 +0000 (13:24 -0700)]
Fix use of uninitialized variable if there are no samples

When creating the plot_info, the 'entry' variable pointing to the last
plot_info data was not initialized (because there was no data to fill
in), and was then incorrectly used to fill in the last tank pressure.

We also used to look at 'dive->sample[0].cylinderindex' even if no
sample[0] necessarily existed.

Reported-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoFix Windows install destination
Dirk Hohndel [Sat, 29 Oct 2011 19:04:52 +0000 (12:04 -0700)]
Fix Windows install destination

I used Desktop for trying things out and forgot to switch back to the more
traditional "Program Files"

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoGet rid of the terminal window that is displayed under Windows
Dirk Hohndel [Sat, 29 Oct 2011 17:27:49 +0000 (10:27 -0700)]
Get rid of the terminal window that is displayed under Windows

Thanks to Michael Wiedmann I now know the magic incantation to get MinGW
to create a Windows executable that doesn't open two windows, a text
console and the actual gtk window.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoAdd first cut of the mingw cross build spec file + nsi file
Dirk Hohndel [Sat, 29 Oct 2011 17:02:40 +0000 (10:02 -0700)]
Add first cut of the mingw cross build spec file + nsi file

These need more work but I'd rather have them here under version control.
The spec file appears to successfully build the Windows binaries, given
the right tar file to start with. Those binaries are then packed into an
rpm file (extermely useless to Windows users).

Once the rpm is unpacked one can then use the NSIS compiler and the .nsi
file to create a Windows installer. This all is still extremely fragile,
but it worked at least once...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoGet icons working correctly under Windows
Dirk Hohndel [Sat, 29 Oct 2011 16:14:15 +0000 (09:14 -0700)]
Get icons working correctly under Windows

With this we are able to include both a separate .ico file that the
program can load at runtime and a .res file (that is created from the .rc
file, both in the packaging/windows directory) that is linked into the
executable and makes the Windows Explorer show the correct icon for
subsurface.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branches 'mingw-port-cleanup' and 'combobox-text-entry-fix' of git://github...
Linus Torvalds [Sat, 29 Oct 2011 14:23:41 +0000 (07:23 -0700)]
Merge branches 'mingw-port-cleanup' and 'combobox-text-entry-fix' of git://github.com/dirkhh/subsurface

* 'mingw-port-cleanup' of git://github.com/dirkhh/subsurface:
  Use Registry on Windows to store preferences

* 'combobox-text-entry-fix' of git://github.com/dirkhh/subsurface:
  Update the known locations / buddies / divemasters as user enters them

12 years agoUpdate the known locations / buddies / divemasters as user enters them
Dirk Hohndel [Sat, 29 Oct 2011 05:51:15 +0000 (22:51 -0700)]
Update the known locations / buddies / divemasters as user enters them

The code that allowed a user to start typing the name of a location, buddy
or divemaster and that would then offer completions has one flaw - it
doesn't add any new names that you enter to its store of names until you
save and restart the app. This patch fixes that.

When reading the code I also noted that the location_changed,
divemaster_changed, buddy_changed variables have become meaningless. They
are set to 1 and tested, but never changed. I wasn't sure if I should
remove the variables (as the code seems to work without them having any
impact), or if we should go back to actually tracking these changes to
prevent unnecessarily marking the divelist as changed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoUse Registry on Windows to store preferences
Dirk Hohndel [Sat, 29 Oct 2011 01:46:53 +0000 (18:46 -0700)]
Use Registry on Windows to store preferences

No change at all to non-Windows builds.

Everything seems to work with preferences - but only tested on Win7

Remaining issue: displaying an icon (or the logo in the About dialog)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoDon't use gconf on Windows
Dirk Hohndel [Fri, 28 Oct 2011 05:10:35 +0000 (22:10 -0700)]
Don't use gconf on Windows

So far this just removes the gconf code - so no preferences for Windows.

It also removes the unsused gconf references in main.c

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoCleanup Makefile and make it work for cross compiling with MinGW
Dirk Hohndel [Thu, 27 Oct 2011 16:04:29 +0000 (09:04 -0700)]
Cleanup Makefile and make it work for cross compiling with MinGW

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoRearrange the event filter dialog
Dirk Hohndel [Tue, 25 Oct 2011 11:18:31 +0000 (04:18 -0700)]
Rearrange the event filter dialog

Create a table with four rows of toggle events and resize it as needed.
This may not create the most beautiful layout, but it works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoAdd menu item and dialog to select which events to display
Dirk Hohndel [Tue, 25 Oct 2011 09:51:16 +0000 (02:51 -0700)]
Add menu item and dialog to select which events to display

Right now they are displayed in one hbox which doesn't work if you have
many events - but the code itself works and correctly toggles the events
on and off.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoDon't plot an event if an event is disabled in ev_namelist
Dirk Hohndel [Tue, 25 Oct 2011 08:25:12 +0000 (01:25 -0700)]
Don't plot an event if an event is disabled in ev_namelist

We don't have a way to actually configure this in the app, yet, but
toggling the bits in the debugger shows that this works, so commit this
code now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoRemember the event names as we encounter them
Dirk Hohndel [Tue, 25 Oct 2011 07:29:19 +0000 (00:29 -0700)]
Remember the event names as we encounter them

First step to being able to filter the events that we display in the
profile. We could (in theory) walk all the dives in the divelist when we
need this data, but it seems much more convenient to have them in an array
in one place.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoAvoid using strptime
Dirk Hohndel [Mon, 24 Oct 2011 20:42:36 +0000 (13:42 -0700)]
Avoid using strptime

It's less portable (missing on Windows, for example) and it's kind of
overkill here - the same is easily done with a sscanf.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoAnnotate Makefile with hints about building under Windows
Dirk Hohndel [Mon, 24 Oct 2011 19:24:51 +0000 (12:24 -0700)]
Annotate Makefile with hints about building under Windows

You can build subsurface with MinGW. It requires installing lots of random
packages, plus some things still don't work. One is that xml2-config
appears to be missing. So this annotates the Makefile to tell a person
building under Windows how to work around this. But we can't make this
platform conditional as this workaround is hardcoding the install path.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoStop including regex.h
Dirk Hohndel [Mon, 24 Oct 2011 19:17:07 +0000 (12:17 -0700)]
Stop including regex.h

I removed the regex code from the uemis parser a long time ago, but forgot
to remove the #include <regex.h>

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMerge branch 'bugfixes' of git://github.com/dirkhh/subsurface
Linus Torvalds [Mon, 24 Oct 2011 11:53:19 +0000 (13:53 +0200)]
Merge branch 'bugfixes' of git://github.com/dirkhh/subsurface

* 'bugfixes' of git://github.com/dirkhh/subsurface:
  Updated changes file
  Create packaging directory and add spec and changes file
  Makefile fixes

12 years agoUpdated changes file
Dirk Hohndel [Mon, 24 Oct 2011 11:34:59 +0000 (04:34 -0700)]
Updated changes file

Turns out that I forgot the -a in the last commit. Sorry

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoCreate packaging directory and add spec and changes file
Dirk Hohndel [Mon, 24 Oct 2011 11:26:17 +0000 (04:26 -0700)]
Create packaging directory and add spec and changes file

These work for me on OBS

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMakefile fixes
Dirk Hohndel [Mon, 24 Oct 2011 11:12:44 +0000 (04:12 -0700)]
Makefile fixes

The stupid lib vs lib64 problem. I'm sure there's a more portable way to
handle this, but this at least seems to work.

Also fix the install target. Seriously, you create a directory with mode
644 and claim that this ever worked?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoSubsurface 1.1
Linus Torvalds [Mon, 24 Oct 2011 08:23:09 +0000 (10:23 +0200)]
Subsurface 1.1

We've added a fair amount of features since 1.0 (like multi-tank) and
we've made things a lot prettier and supports editing much more
information.  So let's make a new release.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'ui' of git://github.com/dirkhh/subsurface
Linus Torvalds [Mon, 24 Oct 2011 05:03:22 +0000 (07:03 +0200)]
Merge branch 'ui' of git://github.com/dirkhh/subsurface

* 'ui' of git://github.com/dirkhh/subsurface:
  Disable sorting by dive number
  Fix oversight in preference implementation
  Make columns for temperature, cylinder, and nitrox optional
  Show dive number in dive list
  Improve time marker handling and add printing of some time labels

12 years agoDisable sorting by dive number
Dirk Hohndel [Sun, 23 Oct 2011 21:38:33 +0000 (14:38 -0700)]
Disable sorting by dive number

This is based on Linus idea and code - just adding it to my UI branch in
case he didn't actually add it to his code...

It makes no sense to sort by dive number - every sane person will have
dive numbers be chronological; so they can sort by date instead.

But removing this option wastes less space and makes the dive list look
much better

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoFix oversight in preference implementation
Dirk Hohndel [Sun, 23 Oct 2011 21:23:58 +0000 (14:23 -0700)]
Fix oversight in preference implementation

Not being careful enough doing copy and paste and then making manual
changes... this inconsistency caused subsurface to always store the
opposite of what you wanted in the preferences for SAC and O2%.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
12 years agoMake columns for temperature, cylinder, and nitrox optional
Dirk Hohndel [Sun, 23 Oct 2011 20:36:37 +0000 (13:36 -0700)]
Make columns for temperature, cylinder, and nitrox optional

Just like SAC and OTU these can now be turned on and off through the
preferences.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>