From b07af31ea566eaa4237391ff3c1f7aae86f411a8 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Tue, 24 Dec 2013 18:08:19 +0200 Subject: [PATCH] Try to detect whether DivingLog's samples are m/f Seems that we can detect the unit of samples from DivingLog import when comparing the maximum dive depth to the maximum recorded sample depth. If sample is bigger, it is recorded in imperial. Of course this relies on the assumption that the max depth of dive is recorded in metric unit, but that seems to be the case, at least in the sample received. It really does not make any sense to have both units in use for one dive without any info on the unit used. But since that is the case, let's try to cope with it. Fixes #316 Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- xslt/DivingLog.xslt | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/xslt/DivingLog.xslt b/xslt/DivingLog.xslt index 4e7dc8b08..abf22d0d1 100644 --- a/xslt/DivingLog.xslt +++ b/xslt/DivingLog.xslt @@ -148,6 +148,30 @@ + + + + + + + + + + + + + + + + + + + + @@ -181,7 +205,14 @@ - + + + + + + + + @@ -195,9 +226,17 @@ + - + + + + + + + +