On 18 September, 2016 - Anton Lundin wrote:
> On 17 September, 2016 - Dirk Hohndel wrote:
>
> >
> > Thanks to Linus and Anton we have an updated Subsurface-branch for
> > libdivecomputer.
> > This goes along with an update to Subsurface itself to adjust to the
> > modified API for our serial code.
> >
> > I’ve had problems with the native Bluetooth code for a while and feel
> > like I can’t quite figure out where the culprit is. I only had a chance to
> > test this on my Mac, though, and Bluetooth has always been a challenge
> > on the Mac.
> >
> > I’d appreciate if some of you with Bluetooth dive computers could give
> > this a try and let me know if things work on Windows, Linux and Mac.
> >
>
> I tested it on Linux, and it worked.
>
>
> I saw the following earlier:
> static const hw_ostc_layout_t hw_ostc_layout_frog = {
> ...
> 32, /* firmware */ /* 32 or 34??? Anton says 32 (34 == battery), Jef says
> 34 */
>
> That wasn't me, it was Dirk who said 32. I have no clue about how the hw
> frog layout looks.
>
>
I also looked at the diff between Subsurface-branch and Jef's master,
and there are some minor things that diff, that we probably should
resync just to make future merges easier.
Here are patches for a couple of them. There are 2-3 ones left that
should probably be cleaned up to, one being tankinfo vs. tankvolume.
I also noted "Fix the gas mix parsing for the Aladin Tec 2G."
(decfa24f92d148) in Jef's master that didn't make it into Linus merge.
It merges cleanly so just pick it.
//Anton
--
Anton Lundin +46702-161604
>From ad9b952ba87edea869b9a8e7bbde35fe2e418293 Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:01:13 +0200
Subject: [PATCH 1/6] Remove last traces of our old custom serial code
This is just to make future merges easier.
There were nothing left of Claudiu's code in those files, so thats why i
removed the copyright lines.
Signed-off-by: Anton Lundin <[email protected]>
---
include/libdivecomputer/descriptor.h | 3 +--
include/libdivecomputer/device.h | 2 --
include/libdivecomputer/hw_ostc3.h | 1 -
include/libdivecomputer/shearwater_petrel.h | 1 -
include/libdivecomputer/shearwater_predator.h | 1 -
src/device.c | 1 -
src/hw_ostc3.c | 1 -
src/shearwater_common.c | 1 -
src/shearwater_common.h | 1 -
src/shearwater_petrel.c | 1 -
src/shearwater_predator.c | 1 -
11 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/include/libdivecomputer/descriptor.h b/include/libdivecomputer/descriptor.h
index b227973..1df5b12 100644
--- a/include/libdivecomputer/descriptor.h
+++ b/include/libdivecomputer/descriptor.h
@@ -33,8 +33,7 @@ typedef enum dc_transport_t {
DC_TRANSPORT_NONE,
DC_TRANSPORT_SERIAL,
DC_TRANSPORT_USB,
- DC_TRANSPORT_IRDA,
- DC_TRANSPORT_BLUETOOTH
+ DC_TRANSPORT_IRDA
} dc_transport_t;
typedef struct dc_descriptor_t dc_descriptor_t;
diff --git a/include/libdivecomputer/device.h b/include/libdivecomputer/device.h
index 008d3c2..7ba4bd6 100644
--- a/include/libdivecomputer/device.h
+++ b/include/libdivecomputer/device.h
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -42,7 +41,6 @@ typedef enum dc_event_type_t {
} dc_event_type_t;
typedef struct dc_device_t dc_device_t;
-typedef struct dc_serial_t dc_serial_t;
typedef struct dc_event_progress_t {
unsigned int current;
diff --git a/include/libdivecomputer/hw_ostc3.h b/include/libdivecomputer/hw_ostc3.h
index 4c4a8e4..1011f06 100644
--- a/include/libdivecomputer/hw_ostc3.h
+++ b/include/libdivecomputer/hw_ostc3.h
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2013 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/include/libdivecomputer/shearwater_petrel.h b/include/libdivecomputer/shearwater_petrel.h
index f1fe8b0..18a4bce 100644
--- a/include/libdivecomputer/shearwater_petrel.h
+++ b/include/libdivecomputer/shearwater_petrel.h
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2013 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/include/libdivecomputer/shearwater_predator.h b/include/libdivecomputer/shearwater_predator.h
index 8939c6c..28163e2 100644
--- a/include/libdivecomputer/shearwater_predator.h
+++ b/include/libdivecomputer/shearwater_predator.h
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2012 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/device.c b/src/device.c
index 56a2422..3edb807 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c
index f4f2c10..0fee734 100644
--- a/src/hw_ostc3.c
+++ b/src/hw_ostc3.c
@@ -3,7 +3,6 @@
*
* Copyright (C) 2013 Jef Driesen
* Copyright (C) 2014 Anton Lundin
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/shearwater_common.c b/src/shearwater_common.c
index 7493161..2546998 100644
--- a/src/shearwater_common.c
+++ b/src/shearwater_common.c
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2013 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/shearwater_common.h b/src/shearwater_common.h
index 0b49c59..b93f973 100644
--- a/src/shearwater_common.h
+++ b/src/shearwater_common.h
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2013 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/shearwater_petrel.c b/src/shearwater_petrel.c
index 06fba30..b791388 100644
--- a/src/shearwater_petrel.c
+++ b/src/shearwater_petrel.c
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2013 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/src/shearwater_predator.c b/src/shearwater_predator.c
index f018885..7975b8f 100644
--- a/src/shearwater_predator.c
+++ b/src/shearwater_predator.c
@@ -2,7 +2,6 @@
* libdivecomputer
*
* Copyright (C) 2012 Jef Driesen
- * Copyright (C) 2015 Claudiu Olteanu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
--
2.7.4
>From d53e3502aff76a4b7f85a7fe2c44266d2f963cbe Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:10:31 +0200
Subject: [PATCH 2/6] Add blank row to match upstream
Signed-off-by: Anton Lundin <[email protected]>
---
src/device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/device.c b/src/device.c
index 3edb807..f94adf2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -197,6 +197,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
return rc;
}
+
int
dc_device_isinstance (dc_device_t *device, const dc_device_vtable_t *vtable)
{
--
2.7.4
>From c19969d84e81dd173bc349791ee38b58910674dd Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:17:25 +0200
Subject: [PATCH 3/6] Don't overwrite status
This removes whats probably a merge error, that overwrites the return
status.
Signed-off-by: Anton Lundin <[email protected]>
---
src/hw_ostc3.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c
index 0fee734..81c54f0 100644
--- a/src/hw_ostc3.c
+++ b/src/hw_ostc3.c
@@ -356,7 +356,6 @@ hw_ostc3_device_open (dc_device_t **out, dc_context_t *context, const char *name
status = dc_serial_set_timeout (device->port, 3000);
if (status != DC_STATUS_SUCCESS) {
ERROR (context, "Failed to set the timeout.");
- status = DC_STATUS_IO;
goto error_close;
}
--
2.7.4
>From ea8f14be2dab5679ba8f057292c719fc0d798e57 Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:20:31 +0200
Subject: [PATCH 4/6] Set error status if transfer fails in close
This fixes whats probably was a merge error. This is a resync with
upstream.
Signed-off-by: Anton Lundin <[email protected]>
---
src/hw_ostc3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c
index 81c54f0..e8df9b5 100644
--- a/src/hw_ostc3.c
+++ b/src/hw_ostc3.c
@@ -527,6 +527,7 @@ hw_ostc3_device_close (dc_device_t *abstract)
rc = hw_ostc3_transfer (device, NULL, EXIT, NULL, 0, NULL, 0, NODELAY);
if (rc != DC_STATUS_SUCCESS) {
ERROR (abstract->context, "Failed to send the command.");
+ dc_status_set_error(&status, rc);
}
}
--
2.7.4
>From 0eea84a2bf4b944adaea2407a4cc20a41c7ac6f7 Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:02:52 +0200
Subject: [PATCH 5/6] Build example applications by default again
A while back, the example applications where broken in our
Subsurface-branch, and got disabled by default. This re-enables them to
sync better with upstream.
Signed-off-by: Anton Lundin <[email protected]>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 44f8b4c..0391cb2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,8 +49,8 @@ AS_IF([test "x$enable_pty" = "xyes"], [
# Example applications.
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples=@<:@yes/no@:>@],
- [Build example applications @<:@default=no@:>@])],
- [], [enable_examples=no])
+ [Build example applications @<:@default=yes@:>@])],
+ [], [enable_examples=yes])
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])
# Checks for programs.
--
2.7.4
>From 24ad7381fc16ebe7c38c4b079f6b5e04d6c09a8f Mon Sep 17 00:00:00 2001
From: Anton Lundin <[email protected]>
Date: Sun, 18 Sep 2016 08:29:02 +0200
Subject: [PATCH 6/6] Fix merge error of AQUAI300 memory layout
This removes the additional entry for AQUAI300, as it was done in "Fix
the memory layout for the Aqualung i300." (1e22760f9102ac).
Signed-off-by: Anton Lundin <[email protected]>
---
src/oceanic_atom2.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c
index 89741bc..b3ddce4 100644
--- a/src/oceanic_atom2.c
+++ b/src/oceanic_atom2.c
@@ -129,7 +129,6 @@ static const oceanic_common_version_t oceanic_default_version[] = {
{"DATAMASK \0\0 512K"},
{"COMPMASK \0\0 512K"},
{"HOLLDG03 \0\0 512K"},
- {"AQUAI300 \0\0 512K"},
};
static const oceanic_common_version_t oceanic_proplus3_version[] = {
--
2.7.4
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface