On Mittwoch, 1. November 2017 09:42:04 CET Jef Driesen wrote:
> On 31-10-17 23:35, Berthold Stoeger wrote:
> > On Dienstag, 31. Oktober 2017 11:29:00 CET Jef Driesen wrote:
> >> I believe you have the model number wrong. I think it should be 0x17,
> > 
> >> and your test seems to confirm that:
> > Well, I put a printf directly after "rc = scubapro_g2_transfer (device,
> > cmd_model, sizeof (cmd_model), model, sizeof (model));" and guess what?
> > I got both, 0x17 *and* 0xa5 (the latter much more commonly). There seems
> > to be some race. Will investigate further - tomorrow.
> > 
> > But when manually sending 0x10 manually with my test program, I
> > consistently get a 0x17, which therefore seems to be the correct model.
> > Sigh.
> 
> That's indeed strange. Probably something is still wrong. Can you share the
> logs? Maybe we can spot something?

Nothing wrong - turns out the culprit was my own "inject dive data" code (a5 
is the start of a new dive). That's what you get for trying to be clever. :(

The correct model number is 0x17 - I will send you logs later.

@Linus: patch attached. Sorry about that.

Berthold
>From 808b84b5b56feeff7920f8de0e011bb910724485 Mon Sep 17 00:00:00 2001
From: Berthold Stoeger <[email protected]>
Date: Wed, 1 Nov 2017 10:16:51 +0100
Subject: [PATCH] Fix model number of the Scubapro Aladin Sport Matrix.

The model number was wrong. Mea culpa.

Signed-off-by: Berthold Stoeger <[email protected]>
---
 src/descriptor.c          | 2 +-
 src/uwatec_smart_parser.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/descriptor.c b/src/descriptor.c
index b1b6dd1..0df6ca0 100644
--- a/src/descriptor.c
+++ b/src/descriptor.c
@@ -140,7 +140,7 @@ static const dc_descriptor_t g_descriptors[] = {
 	/* Scubapro G2 */
 #ifdef USBHID
 	{"Scubapro", "G2",                  DC_FAMILY_UWATEC_G2, 0x32},  // BLE
-	{"Scubapro", "Aladin Sport Matrix", DC_FAMILY_UWATEC_G2, 0xa5},  // BLE
+	{"Scubapro", "Aladin Sport Matrix", DC_FAMILY_UWATEC_G2, 0x17},  // BLE
 #endif
 	/* Reefnet */
 	{"Reefnet", "Sensus",       DC_FAMILY_REEFNET_SENSUS, 1},
diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c
index 95a28fa..e0726e4 100644
--- a/src/uwatec_smart_parser.c
+++ b/src/uwatec_smart_parser.c
@@ -41,6 +41,7 @@
 #define ALADINTEC2G       0x13
 #define SMARTCOM          0x14
 #define ALADIN2G          0x15
+#define ALADINSPORTMATRIX 0x17
 #define SMARTTEC          0x18
 #define GALILEOTRIMIX     0x19
 #define SMARTZ            0x1C
@@ -48,7 +49,6 @@
 #define CHROMIS           0x24
 #define MANTIS2           0x26
 #define G2                0x32
-#define ALADINSPORTMATRIX 0xa5
 
 #define UNSUPPORTED 0xFFFFFFFF
 
-- 
2.14.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to