summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2020-09-08 21:25:26 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-15 08:47:51 -0700
commitdee2b510bb1dee724d9f533f39e505c5804de1ac (patch)
treed3fb198925d4efc57fea78db74a06d29076a1a0d /core
parentb8b67f239b80b72c852937bc5058dde2b8b83ad9 (diff)
downloadsubsurface-dee2b510bb1dee724d9f533f39e505c5804de1ac.tar.gz
Ignore gas changes if we one line contains bogus O2
This will ignore the gas changes that would be caused by Shearwater cloud saving rows with 0 values in them. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/import-shearwater.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/import-shearwater.c b/core/import-shearwater.c
index f56035bab..118d4056a 100644
--- a/core/import-shearwater.c
+++ b/core/import-shearwater.c
@@ -325,7 +325,7 @@ static int shearwater_cloud_dive(void *param, int columns, char **data, char **c
char get_profile_template[] = "select currentTime,currentDepth,waterTemp,averagePPO2,currentNdl,CNSPercent,decoCeiling,firstStopDepth,firstStopTime from dive_log_records where diveLogId=%ld";
char get_profile_template_ai[] = "select currentTime,currentDepth,waterTemp,averagePPO2,currentNdl,CNSPercent,decoCeiling,aiSensor0_PressurePSI,aiSensor1_PressurePSI,firstStopDepth,firstStopTime from dive_log_records where diveLogId = %ld and currentTime > 0";
char get_cylinder_template[] = "select fractionO2 / 100,fractionHe / 100 from dive_log_records where diveLogId = %ld group by fractionO2,fractionHe";
- char get_changes_template[] = "select a.currentTime,a.fractionO2 / 100,a.fractionHe /100 from dive_log_records as a,dive_log_records as b where (a.id - 1) = b.id and (a.fractionO2 != b.fractionO2 or a.fractionHe != b.fractionHe) and a.diveLogId=b.divelogId and a.diveLogId = %ld and a.currentTime > 0";
+ char get_changes_template[] = "select a.currentTime,a.fractionO2 / 100,a.fractionHe /100 from dive_log_records as a,dive_log_records as b where (a.id - 1) = b.id and (a.fractionO2 != b.fractionO2 or a.fractionHe != b.fractionHe) and a.diveLogId=b.divelogId and a.diveLogId = %ld and a.fractionO2 > 0 and b.fractionO2 > 0";
char get_mode_template[] = "select distinct currentCircuitSetting from dive_log_records where diveLogId = %ld";
char get_buffer[1024];