ProPlus 2.1 Temperature Values

Sam Calhoun sam at divenav.com
Wed Feb 29 23:54:47 UTC 2012


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




More information about the Devel mailing list