diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-28 15:49:02 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-28 16:03:03 -0700 |
commit | 01f1ccff14571c93bbbffef4a34c56fe2049b750 (patch) | |
tree | a65cce28beb406f9e21bf6e8fa266e06d52ac867 /save-xml.c | |
parent | 601ac0c3624b1cdb3c1bb44b213d72eba400e642 (diff) | |
download | subsurface-01f1ccff14571c93bbbffef4a34c56fe2049b750.tar.gz |
Add support for visibility tracking and allow manual entry air temp
Turns out we had a data field for visibility as a length unit - but never
used it. I can never guess how much visibility we actually had on a dive -
but I think most everyone can assign a rating between abysmal (zero stars,
"I couldn't read my dive computer even right in front of my mask" - trust
me, I had some of those dives) to amazing ("five stars, I could see farther
than I though possible" - and I had one or two of those, too). So I
changed this to an integer and am re-using the star infrastructure we have
for the overall dive rating.
When displaying this I was dismayed that we are running out of space in
the "Dive Notes" notbook. So I moved this to the "Dive Info" notebook.
This is not consistent and not logical. I think we need to revisit the
notebooks and think about what we want to display where.
While adding the infrastructure to manually enter the visibility I went
ahead and added the ability to manually enter the air temperature as well
(that was one of the things missing in the previous commit).
Fixes #7
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c index f386814f3..fb62651d6 100644 --- a/save-xml.c +++ b/save-xml.c @@ -329,6 +329,8 @@ static void save_dive(FILE *f, struct dive *dive) fprintf(f, " tripflag='%s'", tripflag_names[dive->tripflag]); if (dive->rating) fprintf(f, " rating='%d'", dive->rating); + if (dive->visibility) + fprintf(f, " visibility='%d'", dive->visibility); fprintf(f, " date='%04u-%02u-%02u'", tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday); fprintf(f, " time='%02u:%02u:%02u'", |