Discard deleted dives on DM5 import
I had some double profiles with slight differences in them, until I realized that this was caused by including deleted dives in the import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ad5503fec5
commit
44b4ae00ed
@ -2407,7 +2407,7 @@ int parse_dm5_buffer(sqlite3 *handle, const char *url, const char *buffer, int s
|
||||
|
||||
/* StartTime is converted from Suunto's nano seconds to standard
|
||||
* time. We also need epoch, not seconds since year 1. */
|
||||
char get_dives[] = "select DiveId,StartTime/10000000-62135596800,Note,Duration,coalesce(SourceSerialNumber,SerialNumber),Source,MaxDepth,SampleInterval,StartTemperature,BottomTemperature,StartPressure,EndPressure,'','',SurfacePressure,DiveTime,SampleInterval,ProfileBlob,TemperatureBlob,PressureBlob,'','','','',SampleBlob FROM Dive";
|
||||
char get_dives[] = "select DiveId,StartTime/10000000-62135596800,Note,Duration,coalesce(SourceSerialNumber,SerialNumber),Source,MaxDepth,SampleInterval,StartTemperature,BottomTemperature,StartPressure,EndPressure,'','',SurfacePressure,DiveTime,SampleInterval,ProfileBlob,TemperatureBlob,PressureBlob,'','','','',SampleBlob FROM Dive where Deleted is null";
|
||||
|
||||
retval = sqlite3_exec(handle, get_dives, &dm5_dive, handle, &err);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user