[RFC] Work done so far

Jef Driesen jef at libdivecomputer.org
Tue Jun 3 10:51:26 PDT 2014


On 03-06-14 17:07, Joshua Joseph wrote:
> This patch implements Jef's suggestion on the previous patches.
>
>   	rc = dc_device_open(&data->device, data->context, data->descriptor, data->devname);
>   	if (rc == DC_STATUS_SUCCESS) {
> -		if (vendor.trimmed() == "Heinrichs Weikamp") {
> +		if (dc_device_get_type(data->device) == DC_FAMILY_HW_OSTC3) {
>   			unsigned char hw_data[10];
>   			hw_frog_device_version(data->device, hw_data, 10);

This part is still wrong. If you call hw_frog_device_version, you should check 
for DC_FAMILY_HW_FROG. Otherwise the call will always fail with 
DC_STATUS_INVALIDARGS.

Jef


More information about the subsurface mailing list