Divinglog import: ignore unsupported cylinders
Subsurface supports currently 8 cylinders, thus we should not attempt to add more. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
30bdc83105
commit
abbebef997
@ -2851,6 +2851,14 @@ extern int divinglog_cylinder(void *handle, int columns, char **data, char **col
|
||||
short dbl = 1;
|
||||
//char get_cylinder_template[] = "select TankID,TankSize,PresS,PresE,PresW,O2,He,DblTank from Tank where LogID = %d";
|
||||
|
||||
/*
|
||||
* Divinglog might have more cylinders than what we support. So
|
||||
* better to ignore those.
|
||||
*/
|
||||
|
||||
if (cur_cylinder_index >= MAX_CYLINDERS)
|
||||
return 0;
|
||||
|
||||
if (data[7] && atoi(data[7]) > 0)
|
||||
dbl = 2;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user