[PATCH 2/6] Cochran: Added descriptors for early Commander
Jef Driesen
jef at libdivecomputer.org
Thu Aug 10 07:55:56 PDT 2017
On 2017-07-15 22:39, John Van Ostrand wrote:
> -#define COCHRAN_MODEL_COMMANDER_PRE21000 0
> -#define COCHRAN_MODEL_COMMANDER_AIR_NITROX 1
> -#define COCHRAN_MODEL_EMC_14 2
> -#define COCHRAN_MODEL_EMC_16 3
> -#define COCHRAN_MODEL_EMC_20 4
> +#define COCHRAN_MODEL_COMMANDER_TM 0
> +#define COCHRAN_MODEL_COMMANDER_PRE21000 1
> +#define COCHRAN_MODEL_COMMANDER_AIR_NITROX 2
> +#define COCHRAN_MODEL_EMC_14 3
> +#define COCHRAN_MODEL_EMC_16 4
> +#define COCHRAN_MODEL_EMC_20 5
These values are now out of sync with the ones in src/descriptor.c:
> --- a/src/descriptor.c
> +++ b/src/descriptor.c
> @@ -297,6 +297,7 @@ static const dc_descriptor_t g_descriptors[] = {
> {"Cochran", "EMC-14", DC_FAMILY_COCHRAN_COMMANDER, 2},
> {"Cochran", "EMC-16", DC_FAMILY_COCHRAN_COMMANDER, 3},
> {"Cochran", "EMC-20H", DC_FAMILY_COCHRAN_COMMANDER, 4},
> + {"Cochran", "Commander TM", DC_FAMILY_COCHRAN_COMMANDER, 5},
> };
That's not only confusing but also breaks the parser side when using the
dc_parser_new2() function. That function obtains the model number from
the descriptor, while the dc_parser_new() gets it from the devinfo
event.
Jef
More information about the devel
mailing list