mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
OSTC tools: prevent unknown dc family
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
66375689b8
commit
99bcdb3f30
1 changed files with 13 additions and 10 deletions
23
ostctools.c
23
ostctools.c
|
@ -109,16 +109,19 @@ void ostctools_import(const char *file, struct dive_table *divetable)
|
||||||
|
|
||||||
// Try to determine the dc family based on the header type
|
// Try to determine the dc family based on the header type
|
||||||
switch (buffer[2]) {
|
switch (buffer[2]) {
|
||||||
case 0x20:
|
case 0x20:
|
||||||
case 0x21:
|
case 0x21:
|
||||||
dc_fam = DC_FAMILY_HW_OSTC;
|
dc_fam = DC_FAMILY_HW_OSTC;
|
||||||
break;
|
break;
|
||||||
case 0x22:
|
case 0x22:
|
||||||
dc_fam = DC_FAMILY_HW_FROG;
|
dc_fam = DC_FAMILY_HW_FROG;
|
||||||
break;
|
break;
|
||||||
case 0x23:
|
case 0x23:
|
||||||
dc_fam = DC_FAMILY_HW_OSTC3;
|
dc_fam = DC_FAMILY_HW_OSTC3;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "got unknown dc family %x\n", buffer[2]);
|
||||||
|
dc_fam = DC_FAMILY_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare data to pass to libdivecomputer. OSTC protocol doesn't include
|
// Prepare data to pass to libdivecomputer. OSTC protocol doesn't include
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue