Re: Wrongly ID on Shearwater Petrel 2 -4.6 Beta 1

2016-10-13 Thread JB2Cool
Screengrab might help clarify things.

[image: Inline images 1]

On 13 October 2016 at 12:03, JB2Cool  wrote:

> I get this on my OSTC mk2 when I have a different version of the firmware
> on it. Does the Shearwater get regular firmware updates too, that could
> well cause it to have a different device ID.
>
> JB
>
> On 13 October 2016 at 11:50, John Smith  wrote:
>
>> I use a Petrel 2 and download via Bluetooth.
>>
>>
>> Looking at the Device List so that I could change the nickname of my
>> petrel, I noticed that I have different device IDs attached to the same
>> unit.
>>
>>
>>
>> I've checked in Shearwaters software and the recorded ID is 380D2ACD.
>>
>>
>> I've attached the subsurface log and I tried to get a dump file , but
>> whenever its selected I get a dive data import error. I will try and get
>> one later.
>>
>>
>>
>>
>>
>>
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Wrongly ID on Shearwater Petrel 2 -4.6 Beta 1

2016-10-13 Thread JB2Cool
I get this on my OSTC mk2 when I have a different version of the firmware
on it. Does the Shearwater get regular firmware updates too, that could
well cause it to have a different device ID.

JB

On 13 October 2016 at 11:50, John Smith  wrote:

> I use a Petrel 2 and download via Bluetooth.
>
>
> Looking at the Device List so that I could change the nickname of my
> petrel, I noticed that I have different device IDs attached to the same
> unit.
>
>
>
> I've checked in Shearwaters software and the recorded ID is 380D2ACD.
>
>
> I've attached the subsurface log and I tried to get a dump file , but
> whenever its selected I get a dive data import error. I will try and get
> one later.
>
>
>
>
>
>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


[PATCH] tex export: check site pointer, before accessing it; print empty string rather than 'null'

2016-10-13 Thread Martin Gysel
Signed-off-by: Martin Gysel 
---
 desktop-widgets/divelogexportdialog.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/desktop-widgets/divelogexportdialog.cpp 
b/desktop-widgets/divelogexportdialog.cpp
index 9d3d271..6121bd9 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -282,7 +282,7 @@ void DiveLogExportDialog::export_TeX(const char *filename, 
const bool selected_o
put_format(, "\\def\\date{%04u-%02u-%02u}\n",
  tm.tm_year, tm.tm_mon+1, tm.tm_mday);
put_format(, "\\def\\number{%d}\n", dive->number);
-   put_format(, "\\def\\place{%s}\n", site->name);
+   put_format(, "\\def\\place{%s}\n", site ? site->name : "");
put_format(, "\\def\\spot{}\n");
put_format(, "\\def\\country{}\n");
put_format(, "\\def\\entrance{}\n");
@@ -293,8 +293,8 @@ void DiveLogExportDialog::export_TeX(const char *filename, 
const bool selected_o
put_format(, "\\def\\type{%s}\n", dive->tag_list ? 
dive->tag_list->tag->name : "");
put_format(, "\\def\\viz{%s}\n", viz.toUtf8().data());
put_format(, 
"\\def\\plot{\\includegraphics[width=9cm,height=4cm]{profile%d}}\n", 
dive->number);
-   put_format(, "\\def\\comment{%s}\n", dive->notes);
-   put_format(, "\\def\\buddy{%s}\n", dive->buddy);
+   put_format(, "\\def\\comment{%s}\n", dive->notes ? 
dive->notes : "");
+   put_format(, "\\def\\buddy{%s}\n", dive->buddy ? 
dive->buddy : "");
put_format(, "\\page\n");
}
 
-- 
2.10.1

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Wrongly ID on Shearwater Petrel 2 -4.6 Beta 1

2016-10-13 Thread JB2Cool
On 13 October 2016 at 12:25, John Smith  wrote:

>
> On 13 Oct 2016, at 12:09, JB2Cool  wrote:
>
> Screengrab might help clarify things.
>
> 
>
> On 13 October 2016 at 12:03, JB2Cool  wrote:
>
>> I get this on my OSTC mk2 when I have a different version of the firmware
>> on it. Does the Shearwater get regular firmware updates too, that could
>> well cause it to have a different device ID.
>>
>> Yes, I think my issue is the same, shearwater push very regular updates.
>
> However, the device Id in the shearwater software has never changed, which
> would suggest that libdivecomputer isn't reading the true serial number but
> assigning one instead
>

As far as I can see this is by design, device id isn't the serial, they are
different things. You might want to keep track of  which dives you did on
the Shearwater with firmware 1 and then which dives with firmware 1.1, if
the device id was the same you couldn't tell them apart, having different
device id means that firmware 1.0 and 1.1 show as different devices.

Maybe do as I do and set a friendly name for your dive computer but mention
the firmware version in there too.

Jb

> JB
>>
>> On 13 October 2016 at 11:50, John Smith  wrote:
>>
>>> I use a Petrel 2 and download via Bluetooth.
>>>
>>> Looking at the Device List so that I could change the nickname of my
>>> petrel, I noticed that I have different device IDs attached to the same
>>> unit.
>>>
>>> 
>>>
>>> I've checked in Shearwaters software and the recorded ID is 380D2ACD.
>>>
>>> I've attached the subsurface log and I tried to get a dump file , but
>>> whenever its selected I get a dive data import error. I will try and get
>>> one later.
>>>
>>>
>>> ___
>>> subsurface mailing list
>>> subsurface@subsurface-divelog.org
>>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>>
>>>
>>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface