Re: bug reports on trac

2014-10-28 Thread Robert C. Helling
On 29 Oct 2014, at 04:52, Dirk Hohndel wrote: Dirk, > If it's really just Jef and me who are taking care of this then we as a > community are failing our users. how do I subscribe to the mailing list where new tickets are announced? Best Robert --

bug reports on trac

2014-10-28 Thread Dirk Hohndel
As always, as we get ready for a release, I'm going back through trac bug reports. It's pretty sad how many are sitting there and no one cares. If it's really just Jef and me who are taking care of this then we as a community are failing our users. There are quite a few tickets where there are obv

Re: messing with the gas / tank handling

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 04:47:31PM -0700, Linus Torvalds wrote: > > > I can't remember what the Mares did, though. > > Did we even have multiple sensors? I could have sworn that we had two. I even remember talking to the Mares guys about it. But I can only find one. Does anyone have a spare Mare

Re: messing with the gas / tank handling

2014-10-28 Thread Linus Torvalds
On Tue, Oct 28, 2014 at 4:24 PM, Dirk Hohndel wrote: > > I know we tested this with the Uemis and that simply switched between > sensors in the samples. Right. The Uemis wasn't a reason to switch from our current sensor idx + pressure model. > I can't remember what the Mares did, though. Did we

Re: messing with the gas / tank handling

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 04:00:05PM -0700, Linus Torvalds wrote: > On Tue, Oct 28, 2014 at 3:38 PM, Anton Lundin wrote: > > > > Multiple sensor support feels way better than the current separate > > "diluent-sensor" code we currently carry for the Mk6. > > I think Dirk has another EON Steel with p

Re: messing with the gas / tank handling

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 02:58:50PM -0700, Linus Torvalds wrote: > On Tue, Oct 28, 2014 at 2:13 PM, Dirk Hohndel wrote: > > > > Bug #742 shows that we got things pretty badly wrong for the Cobalt if the > > primary gas used on a dive (or in the case of his sample data, the only > > gas used on a di

Re: messing with the gas / tank handling

2014-10-28 Thread Linus Torvalds
On Tue, Oct 28, 2014 at 3:38 PM, Anton Lundin wrote: > > Multiple sensor support feels way better than the current separate > "diluent-sensor" code we currently carry for the Mk6. I think Dirk has another EON Steel with pressure sensor coming once they are public, so then we can finally test the

Re: messing with the gas / tank handling

2014-10-28 Thread Anton Lundin
On 28 October, 2014 - Linus Torvalds wrote: > On Tue, Oct 28, 2014 at 2:13 PM, Dirk Hohndel wrote: > > > > Bug #742 shows that we got things pretty badly wrong for the Cobalt if the > > primary gas used on a dive (or in the case of his sample data, the only > > gas used on a dive) was not tank 0.

Re: messing with the gas / tank handling

2014-10-28 Thread Linus Torvalds
On Tue, Oct 28, 2014 at 2:13 PM, Dirk Hohndel wrote: > > Bug #742 shows that we got things pretty badly wrong for the Cobalt if the > primary gas used on a dive (or in the case of his sample data, the only > gas used on a dive) was not tank 0. We showed that ugly gas change, we > showed that two g

messing with the gas / tank handling

2014-10-28 Thread Dirk Hohndel
Hey Linus, Usually whenever I touch this code I break it. And then you have to fix it later when you notice that I messed with things. So this time I'll alert you directly. Danger, danger, Dirk touched the gas / tank handling code!!! Bug #742 shows that we got things pretty badly wrong for the C

Re: Translation question

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 04:41:59PM -0400, John Van Ostrand wrote: > I've modified a string that are being translated, specifically the string > below that contains file extensions as well as labels: > > QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open > dive log file"), las

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 21:26, Jef Driesen wrote: > On 28-10-14 17:32, Dirk Hohndel wrote: >> >> The reason so many people reverse engineering want packed structures is >> that it makes it so much easier to write readable code. >> >> A typical 8 byte sample might look like this: >> >> struct sample { >

Translation question

2014-10-28 Thread John Van Ostrand
I've modified a string that are being translated, specifically the string below that contains file extensions as well as labels: QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open dive log file"), lastUsedDir(), tr("Dive log files (*.xml *.uddf *.udcf *.csv *.jlb *.dl

[PATCH] Fixed RegExp bug

2014-10-28 Thread John Van Ostrand
This prevented import of log files other than CSV and TXT. Signed-off-by: John Van Ostrand --- qt-ui/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9e62a8a..1d4b22a 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-

[PATCH] Added missing files (metrics.cpp and diveshareexportdialog.cpp) to CMakeLists.txt

2014-10-28 Thread John Van Ostrand
It now compiles and links properly under cmake. Signed-off-by: John Van Ostrand --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a04794a..c04e968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,7 @@ SET(SUBSURFACE_INTE

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 20:26:21 Jef Driesen wrote: > Finally, you have the alignment and padding issues. I'm not 100% sure about > this, but I think that even for structures only containing 8bit integers, > the compiler is allowed to insert padding bytes. Maybe in practice no sane > compiler d

[PATCH] Added Cochran CAN files to the Open Logbook dialog

2014-10-28 Thread John Van Ostrand
Subsurface can now open CAN files as an alternative to importing. Signed-off-by: John Van Ostrand --- qt-ui/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9aadfd3..9e62a8a 100644 --- a/qt-ui/mainwindow.cpp

Re: cochran_emc.h: packed structs

2014-10-28 Thread Jef Driesen
On 28-10-14 17:32, Dirk Hohndel wrote: The reason so many people reverse engineering want packed structures is that it makes it so much easier to write readable code. A typical 8 byte sample might look like this: struct sample { unsigned char temp; // in F unsigned int16_t depth

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 20:43, Thiago Macieira wrote: > On Tuesday 28 October 2014 09:32:17 Dirk Hohndel wrote: >> A typical 8 byte sample might look like this: >> >> struct sample { >> unsigned char temp; // in F >> unsigned int16_t depth; // in 1/16 ft >> unsigned int16_t deco

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 09:32:17 Dirk Hohndel wrote: > A typical 8 byte sample might look like this: > > struct sample { > unsigned char temp; // in F > unsigned int16_t depth; // in 1/16 ft > unsigned int16_t deco : 1; > unsigned int16_t tank_idx : 2; >

Re: cochran_emc.h: packed structs

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 11:29:48AM -0700, Thiago Macieira wrote: > On Tuesday 28 October 2014 09:34:33 Dirk Hohndel wrote: > > On Tue, Oct 28, 2014 at 09:28:31AM -0700, Thiago Macieira wrote: > > > Are we sure of the sample size? It's an odd number of bytes... > > > > We have dive computers with n

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 09:34:33 Dirk Hohndel wrote: > On Tue, Oct 28, 2014 at 09:28:31AM -0700, Thiago Macieira wrote: > > Are we sure of the sample size? It's an odd number of bytes... > > We have dive computers with non-constant sample sizes. And pretty much any > random number you can think

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 18:28, Thiago Macieira wrote: > On Tuesday 28 October 2014 18:03:27 Lubomir I. Ivanov wrote: >> On 28 October 2014 17:54, Thiago Macieira wrote: >> > On Tuesday 28 October 2014 17:39:27 Lubomir I. Ivanov wrote: >> >> > __declspec(packed) >> >> >> >> i don't have that in MSVC 20

Re: cochran_emc.h: packed structs

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 09:28:31AM -0700, Thiago Macieira wrote: > > Are we sure of the sample size? It's an odd number of bytes... We have dive computers with non-constant sample sizes. And pretty much any random number you can think of. Yes, 8 is common, as are 12 or 16. Anyway, see my other e

Re: cochran_emc.h: packed structs

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 08:54:26AM -0700, Thiago Macieira wrote: > On Tuesday 28 October 2014 17:39:27 Lubomir I. Ivanov wrote: > > > __declspec(packed) > > > > i don't have that in MSVC 2003; perhaps it's a newer feature. > > Yeah, I was wrong, it's not there. > > http://msdn.microsoft.com/en-u

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 18:03:27 Lubomir I. Ivanov wrote: > On 28 October 2014 17:54, Thiago Macieira wrote: > > On Tuesday 28 October 2014 17:39:27 Lubomir I. Ivanov wrote: > >> > __declspec(packed) > >> > >> i don't have that in MSVC 2003; perhaps it's a newer feature. > > > > Yeah, I was w

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 17:54, Thiago Macieira wrote: > On Tuesday 28 October 2014 17:39:27 Lubomir I. Ivanov wrote: >> > __declspec(packed) >> >> i don't have that in MSVC 2003; perhaps it's a newer feature. > > Yeah, I was wrong, it's not there. > > http://msdn.microsoft.com/en-us/library/dabb5z75.as

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 17:39:27 Lubomir I. Ivanov wrote: > > __declspec(packed) > > i don't have that in MSVC 2003; perhaps it's a newer feature. Yeah, I was wrong, it's not there. http://msdn.microsoft.com/en-us/library/dabb5z75.aspx That's probably why the GCC attribute is disabled in Min

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 17:17, Thiago Macieira wrote: > On Tuesday 28 October 2014 08:09:20 Dirk Hohndel wrote: >> On October 28, 2014 8:05:20 AM "Lubomir I. Ivanov" > wrote: >> > On 28 October 2014 16:28, Dirk Hohndel wrote: >> > > On Tue, Oct 28, 2014 at 01:28:47PM +0200, Lubomir I. Ivanov wrote: >

Re: Importing CCR data [was: CCR Testing]

2014-10-28 Thread Paul Sargent
On 28 Oct 2014, at 14:56, Miika Turkia wrote: > On Tue, Oct 28, 2014 at 4:00 PM, Paul Sargent > wrote: > >> Looking at old dives I think most of my problems at the moment are >> really around importing. >> >> - Importing from Shearwater Desktop via XML, all my dives are air dives. >> > Ca

Re: cochran_emc.h: packed structs

2014-10-28 Thread Thiago Macieira
On Tuesday 28 October 2014 08:09:20 Dirk Hohndel wrote: > On October 28, 2014 8:05:20 AM "Lubomir I. Ivanov" wrote: > > On 28 October 2014 16:28, Dirk Hohndel wrote: > > > On Tue, Oct 28, 2014 at 01:28:47PM +0200, Lubomir I. Ivanov wrote: > > >> } __attribute__((packed)); > > >> is unreliable wi

Re: cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 16:28, Dirk Hohndel wrote: > On Tue, Oct 28, 2014 at 01:28:47PM +0200, Lubomir I. Ivanov wrote: >> } __attribute__((packed)); >> is unreliable with MINGW > 4.6 up until 4.8.2 - the one i have bundled >> with the Qt 5.3. > > Yes, Jef pointed that out (with less detail) on the lib

Re: cochran_emc.h: packed structs

2014-10-28 Thread Dirk Hohndel
On October 28, 2014 8:05:20 AM "Lubomir I. Ivanov" wrote: On 28 October 2014 16:28, Dirk Hohndel wrote: > On Tue, Oct 28, 2014 at 01:28:47PM +0200, Lubomir I. Ivanov wrote: >> } __attribute__((packed)); >> is unreliable with MINGW > 4.6 up until 4.8.2 - the one i have bundled >> with the Qt 5.

Re: [PATCH 1/4] dive.h: add a 'unsafe' variant of FOR_EACH_PICTURE

2014-10-28 Thread Lubomir I. Ivanov
On 28 October 2014 16:38, Dirk Hohndel wrote: > On Tue, Oct 28, 2014 at 01:35:13PM +0200, Lubomir I. Ivanov wrote: > So if this warning really keeps you up at night (just kidding) I'll > propose this: create a second macro > > FOR_EACH_PICTURE_NON_PTR(_divestruct) \ > for (struct picture *

Importing CCR data [was: CCR Testing]

2014-10-28 Thread Miika Turkia
On Tue, Oct 28, 2014 at 4:00 PM, Paul Sargent wrote: > > Looking at old dives I think most of my problems at the moment are > really around importing. > > - Importing from Shearwater Desktop via XML, all my dives are air dives. > Can you provide sample XML with clear description of what is mis

Re: [PATCH 1/4] dive.h: add a 'unsafe' variant of FOR_EACH_PICTURE

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 01:35:13PM +0200, Lubomir I. Ivanov wrote: > From: "Lubomir I. Ivanov" > > This prevents a warning caused by -Waddress, that the address > of 'displayed_dive' will always be defined. There are people who have strong feelings about making code changes just to shut up compi

Re: [PATCH 3/6] Change the OSTC3 macros to have a ; in the end

2014-10-28 Thread Anton Lundin
On 27 October, 2014 - Dirk Hohndel wrote: > On Mon, Oct 27, 2014 at 02:13:54PM -0700, Linus Torvalds wrote: > > On Mon, Oct 27, 2014 at 12:37 PM, Anton Lundin wrote: > > > > > > -#define READ_SETTING(_OSTC3_SETTING, _DEVICE_DETAIL) \ > > > +#define READ_SETTING(_OSTC3_SETTING, _DEVICE_DETAIL); \

Re: cochran_emc.h: packed structs

2014-10-28 Thread Dirk Hohndel
On Tue, Oct 28, 2014 at 01:28:47PM +0200, Lubomir I. Ivanov wrote: > } __attribute__((packed)); > is unreliable with MINGW > 4.6 up until 4.8.2 - the one i have bundled > with the Qt 5.3. Yes, Jef pointed that out (with less detail) on the libdivecomputer mailing list. > padding is added regardle

Re: CCR Testing

2014-10-28 Thread Davide DB
Nice analysis ___ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

CCR Testing

2014-10-28 Thread Paul Sargent
I've been spending a bit of time this morning playing with CCR Dives on the latest git version (ee7c86f206f5465df0f0ade08b13da3b8062e67f). This is quite a long mail, but just trying to get everything down. Dive Logs - I dive with two computers on all my CCR dives. There's a Shearwater Pre

Re: Two more rebreather patches

2014-10-28 Thread Rodrigo Severo
On Tue, Oct 28, 2014 at 9:36 AM, Paul Sargent wrote: > > On 27 Oct 2014, at 17:56, Rodrigo Severo wrote: > >>> For example: A one hour dive should be 20bar (60 litres) out of a standard 3 >>> litre cylinder - just calculating 1 litre a minute. That's just way off. I >>> always use about ~50 bar o

Re: Two more rebreather patches

2014-10-28 Thread Paul Sargent
On 27 Oct 2014, at 17:56, Rodrigo Severo wrote: >> For example: A one hour dive should be 20bar (60 litres) out of a standard 3 >> litre cylinder - just calculating 1 litre a minute. That's just way off. I >> always use about ~50 bar on a ~40 metre dive, so I tend to make sure I've >> got at lea

[PATCH 4/4] cochran.c: make cochran_predive_event_bytes() return 0

2014-10-28 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" It seems that an iteration will happen even if the function returns 0, but this looks like a non-breaking change. Signed-off-by: Lubomir I. Ivanov --- cochran.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cochran.c b/cochran.c index 1420699..d486f56 100644 -

[PATCH 3/4] cochran.c: mark 'ascent_rate' as unused

2014-10-28 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" cochran_parse_samples(): 'ascent_rate' can be used at some point so we mark it as unused with (void) Signed-off-by: Lubomir I. Ivanov --- cochran.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cochran.c b/cochran.c index c0b851e..1420699 100644 --- a/cochran.c

[PATCH 2/4] cochran.c: coding style cleanup

2014-10-28 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" - empty lines - indentation - { placement - others... Signed-off-by: Lubomir I. Ivanov --- cochran.c | 434 +- 1 file changed, 200 insertions(+), 234 deletions(-) diff --git a/cochran.c b/cochran.c index b30

[PATCH 1/4] dive.h: add a 'unsafe' variant of FOR_EACH_PICTURE

2014-10-28 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" This prevents a warning caused by -Waddress, that the address of 'displayed_dive' will always be defined. We don't really want to disable this warning group as it's *actually* useful in terms of partability. A previous, less intrusive solution was also proposed which si

cochran_emc.h: packed structs

2014-10-28 Thread Lubomir I. Ivanov
} __attribute__((packed)); is unreliable with MINGW > 4.6 up until 4.8.2 - the one i have bundled with the Qt 5.3. padding is added regardless and there is high potential for the code to break. one solution would be to branch / use "#pragma pack()" which is an MSVC thing but recent MINGW supports

[PATCH 2/3] Parse meta information from Seaber log

2014-10-28 Thread Miika Turkia
This will parse date information from Seabear log file and skips the "header" data to allow parsing of the CSV content. Signed-off-by: Miika Turkia --- dive.h| 1 + file.c| 154 ++ qt-ui/divelogimportdialog

[PATCH 1/3] Fix reading of CDATA elements

2014-10-28 Thread Miika Turkia
If the element we are parsing is of type XML_CDATA_SECTION_NODE, we have to check the node's name from the parent. Fixes #718 Signed-off-by: Miika Turkia --- parse-xml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse-xml.c b/parse-xml.c index 63ce64f..fb55337 100

[PATCH 3/3] Add test dive for Seabear HUDC

2014-10-28 Thread Miika Turkia
Signed-off-by: Miika Turkia --- dives/TestDiveSeabearHUDC.csv | 122 ++ 1 file changed, 122 insertions(+) create mode 100644 dives/TestDiveSeabearHUDC.csv diff --git a/dives/TestDiveSeabearHUDC.csv b/dives/TestDiveSeabearHUDC.csv new file mode 100644 inde

Re: Two more rebreather patches

2014-10-28 Thread Gaetan Bisson
[2014-10-27 15:52:59 -0700] Dirk Hohndel: > On Mon, Oct 27, 2014 at 08:14:44PM +0100, Anton Lundin wrote: > > On 27 October, 2014 - Gaetan Bisson wrote: > > > > > [2014-10-24 16:48:34 +0200] Robert Helling: > > > > what happened to Gaetan’s attempts at coming up with a UI > > > > implementation?