Disable freedive mode for the Uwatec Aladin Tec 2G

The Uwatec Aladin Tec 2G doesn't support freedive mode. This appears to
be a bug in SmartTrak and LogTrak. They both report gauge and air/nitrox
dives as apnea dives.
This commit is contained in:
Jef Driesen 2017-03-26 18:17:05 +02:00
parent b1ba3fa0c6
commit 640308c076

View File

@ -59,8 +59,7 @@
#define FRESH 1.000 #define FRESH 1.000
#define SALT 1.025 #define SALT 1.025
#define FREEDIVE1 0x00000080 #define FREEDIVE 0x00000080
#define FREEDIVE2 0x00000200
#define GAUGE 0x00001000 #define GAUGE 0x00001000
#define SALINITY 0x00100000 #define SALINITY 0x00100000
@ -451,12 +450,8 @@ uwatec_smart_parser_cache (uwatec_smart_parser_t *parser)
// Get the freedive/gauge bits. // Get the freedive/gauge bits.
unsigned int freedive = 0; unsigned int freedive = 0;
unsigned int gauge = (settings & GAUGE) != 0; unsigned int gauge = (settings & GAUGE) != 0;
if (parser->model == ALADINTEC) { if (parser->model != ALADINTEC && parser->model != ALADINTEC2G) {
freedive = 0; freedive = (settings & FREEDIVE) != 0;
} else if (parser->model == ALADINTEC2G) {
freedive = (settings & FREEDIVE2) != 0;
} else {
freedive = (settings & FREEDIVE1) != 0;
} }
// Get the dive mode. The freedive bit needs to be checked // Get the dive mode. The freedive bit needs to be checked