[RFC] Work done so far

Joshua Joseph joejoshw at gmail.com
Tue Jun 3 08:07:40 PDT 2014


On Fri, May 30, 2014 at 12:21 PM, Joshua Joseph <joejoshw at gmail.com> wrote:

>
> On Fri, May 30, 2014 at 11:47 AM, Jef Driesen <jef at libdivecomputer.org>
> wrote:
>
>> On 2014-05-30 09:52, Joshua Joseph wrote:
>>
>>> Please check and see if I am on the right track.
>>>
>>
>> I quickly checked the patched, and noticed one libdivecomputer related
>> mistake: you shouldn't use the vendor or product strings to check the
>> device type. There are much better ways to do this. The strings are mainly
>> intended for display in the user interface.
>>
>> The solution to both of these problems, is to check the family type
>> instead, using the dc_device_get_type or dc_descriptor_get_type function:
>>
>> if (dc_device_get_type(data->device) == DC_FAMILY_HW_FROG) {
>>    ...
>>    hw_frog_device_version(data->device, hw_data, 10);
>>    ...
>> }
>>
>> Jef
>>
>
> Thanks, Jef.
>
> I will apply this correction.
>
> --
> Thanks,
>
> I had forgotten to send in this.

This patch implements Jef's suggestion on the previous patches.
-- 
Thanks,
Joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140603/05fe4010/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Change-dive-computer-family-detection.patch
Type: text/x-patch
Size: 2427 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140603/05fe4010/attachment-0001.bin>


More information about the subsurface mailing list