diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-04 13:34:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-04 13:34:22 -0700 |
commit | f8de487c2f590d6f4e27f878ac104c229667702c (patch) | |
tree | 0a5e6870af4876410c82d44f3eb30202014f7da4 /save-xml.c | |
parent | f448b68de0e844db3628332ebf70f2746882527c (diff) | |
download | subsurface-f8de487c2f590d6f4e27f878ac104c229667702c.tar.gz |
Make a guess at the cylinder description from the size and pressure
I'll want to also add a way to override/set the cylinder type: both
manually by just setting a size in liters, and by picking from some list
of standard cylinder sizes.
For example, it looks like most of my dives are marked as having
12-liter cylinders. That is probably some default from Suunto Dive
Manager, or from whatever Dirk did. It's almost certainly not right for
any of them: as far as I know, the standard cylinders for Lahaina Divers
(which is likely most of the warm water dives) are AL72's for air, and
AL80's for Nitrox.
That would be a 10L and a 11.1L tank respectively, afaik. I don't know
what a 12-liter tank would be or where that size comes from.
Anyway, the LP85+ tank designation for some of the dives looks more
likely: that's one of the common sizes I've used for local dives. So
the size of that thing is much more probably correct.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c index c33cbb0dd..46bcec0a1 100644 --- a/save-xml.c +++ b/save-xml.c @@ -127,6 +127,7 @@ static void save_cylinder_info(FILE *f, struct dive *dive) for (i = 0; i < MAX_CYLINDERS; i++) { cylinder_t *cylinder = dive->cylinder+i; int volume = cylinder->type.size.mliter; + const char *description = cylinder->type.description; int o2 = cylinder->gasmix.o2.permille; int he = cylinder->gasmix.he.permille; @@ -141,6 +142,8 @@ static void save_cylinder_info(FILE *f, struct dive *dive) } if (volume) fprintf(f, " size='%u.%03u l'", FRACTION(volume, 1000)); + if (description) + fprintf(f, " name='%s'", description); fprintf(f, " />\n"); } } |