diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2017-04-11 21:06:37 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-04-11 17:26:31 -0700 |
commit | e355037e20174eeaa734cebc10737005abbf74de (patch) | |
tree | 437e34eaaac9aebc8fd9a767fea50a712bf20539 /core | |
parent | 4ea4e8fa8145b76dac82cf59c739be3c2e15acae (diff) | |
download | subsurface-e355037e20174eeaa734cebc10737005abbf74de.tar.gz |
Ignore empty cylinders on Cobalt import
It appears that Cobalt might include additional gas mixes, and only way
to determine what is used appears to be to ensure that start and end
pressures are greater than 0. One would assume there to be something
else available in the database, but I was not able to spot it.
Fixes #297
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c index 2f5be06bc..c6b7b9ae6 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -2869,7 +2869,7 @@ extern int cobalt_dive(void *param, int columns, char **data, char **column) sqlite3 *handle = (sqlite3 *)param; char *err = NULL; char get_profile_template[] = "select runtime*60,(DepthPressure*10000/SurfacePressure)-10000,p.Temperature from Dive AS d JOIN TrackPoints AS p ON d.Id=p.DiveId where d.Id=%d"; - char get_cylinder_template[] = "select FO2,FHe,StartingPressure,EndingPressure,TankSize,TankPressure,TotalConsumption from GasMixes where DiveID=%d and StartingPressure>0 group by FO2,FHe"; + char get_cylinder_template[] = "select FO2,FHe,StartingPressure,EndingPressure,TankSize,TankPressure,TotalConsumption from GasMixes where DiveID=%d and StartingPressure>0 and EndingPressure > 0 group by FO2,FHe"; char get_buddy_template[] = "select l.Data from Items AS i, List AS l ON i.Value1=l.Id where i.DiveId=%d and l.Type=4"; char get_visibility_template[] = "select l.Data from Items AS i, List AS l ON i.Value1=l.Id where i.DiveId=%d and l.Type=3"; char get_location_template[] = "select l.Data from Items AS i, List AS l ON i.Value1=l.Id where i.DiveId=%d and l.Type=0"; |