summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-28 15:49:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-28 16:03:03 -0700
commit01f1ccff14571c93bbbffef4a34c56fe2049b750 (patch)
treea65cce28beb406f9e21bf6e8fa266e06d52ac867 /parse-xml.c
parent601ac0c3624b1cdb3c1bb44b213d72eba400e642 (diff)
downloadsubsurface-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 'parse-xml.c')
-rw-r--r--parse-xml.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index cb84cc26a..9429580e6 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1126,6 +1126,8 @@ static void try_to_fill_dive(struct dive **divep, const char *name, char *buf)
return;
if (MATCH(".rating", get_index, &dive->rating))
return;
+ if (MATCH(".visibility", get_index, &dive->visibility))
+ return;
if (MATCH(".cylinder.size", cylindersize, &dive->cylinder[cur_cylinder_index].type.size))
return;
if (MATCH(".cylinder.workpressure", pressure, &dive->cylinder[cur_cylinder_index].type.workingpressure))