Support for importing Poseidon MK6 logs

This patch adds support for importing the logs from a Poseidon MK6
rebreather. This DC produces logs that contain of a .txt file that has
all the meta data and a .csv file that contains the sample readings. The
CSV file is different from the others in that it has a line per each
sample reading at given time. Thus we have to merge all the lines from
one point in time into one sample reading of ours.

[Dirk Hohndel: addressed some compiler warnings]

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-05-28 09:55:46 +03:00 committed by Dirk Hohndel
parent bb020ae918
commit 8fcc074b49
5 changed files with 239 additions and 3 deletions

View file

@ -17,6 +17,7 @@
#include "dive.h"
#include "device.h"
#include "membuffer.h"
int verbose, quit;
int metric = 1;
@ -1738,6 +1739,13 @@ void parse_xml_buffer(const char *url, const char *buffer, int size,
xmlFreeDoc(doc);
}
void parse_mkvi_buffer(struct membuffer *txt, struct membuffer *csv, const char *starttime)
{
dive_start();
divedate(starttime, &cur_dive->when);
dive_end();
}
extern int dm4_events(void *handle, int columns, char **data, char **column)
{
event_start();