Hi,
Just writing to say that after using libdivecomputer in my program and testing it with a few different devices, I have found one small bug. The ProPlus 2.1 (the version with metal buttons) did not parse temperature values correctly. Here's the small change to "oceanic_atom2_parser.c" that fixed the issue for me (relative to the latest snapshot on the download page):
--- oceanic_atom2_parser.c-revBASE.svn000.tmp.c Wed Feb 29 23:08:42 2012 UTC +++ oceanic_atom2_parser.c Mon Feb 6 23:48:19 2012 UTC
@@ -37,6 +37,7 @@ #define VEO20 0x4359 #define VEO30 0x435A #define ZENAIR 0x4442 +#define PROPLUS21 0x4444 #define GEO20 0x4446 #define OC1B 0x4449
@@ -329,7 +330,7 @@ temperature = data[offset + 3]; } else { unsigned int sign; - if (parser->model == ATOM2) + if (parser->model == ATOM2 || parser->model == PROPLUS21) sign = (data[offset + 0] & 0x80) >> 7; else sign = (~data[offset + 0] & 0x80) >> 7;
Thanks, Sam
On 03/01/2012 12:54 AM, Sam Calhoun wrote:
Just writing to say that after using libdivecomputer in my program and testing it with a few different devices, I have found one small bug. The ProPlus 2.1 (the version with metal buttons) did not parse temperature values correctly. Here's the small change to "oceanic_atom2_parser.c" that fixed the issue for me (relative to the latest snapshot on the download page):
Your patch has been committed to the git repository.
Thanks for your contribution.
Jef