Add suport to import Scubapro's LogTrak files

Import can be done from .script files generated by LogTrak software or
from .asd files generated by SmartTrak and LogTrak export option.

This code was writen in C, and has just been "ported" to some extent to
C++, so it can work with recent rework of Subsurface to C++.

I'm not a C++ guy, so this is mostly C with some make-up.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
This commit is contained in:
Salvador Cuñat 2024-12-22 18:49:43 +01:00
parent 939154705b
commit 62924e6ef4
6 changed files with 1355 additions and 1 deletions

View file

@ -370,5 +370,15 @@ int parse_file(const char *filename, struct divelog *log)
return ostctools_import(buffer, log);
}
/* Scubapro Logtrak files */
if (fmt && (!strcasecmp(fmt+1, "script"))) {
return logtrak_import(mem, log);
}
/* Scubapro ASD files */
if (fmt && (!strcasecmp(fmt + 1, "asd"))) {
return scubapro_asd_import(mem, log);
}
return parse_file_buffer(filename, mem, log);
}