Re: Bluetooth fails on mobile

2018-04-09 Thread Davide DB
Il lun 9 apr 2018, 21:09 Davide DB  ha scritto:

> Still trying the latest APK on my phones.
>
> No way to download dives from my Petrel 2 on my 4 different phones.
>
> On a Google Nexus 5 only I don't get the BT FAIL error on my Petrel.
> IMHO On Subsurface the UI error message is fake: "no new dives were found
> on this device" but I don't think there was a real data transfer because I
> get the same error while downloading dives from my Samsung TV.
>
> What can I do to get the dives on my phone?
>
> I attached a screenshot of the app log.
>
> PS
> Why don't you use a text control hence text can be selected and copy
> pasted here?
>
> Thank you as always
>
> davide@mobile
>

Finally I got a partial download from my fifth device. An ancient nexus 7
tablet running Android 4.4.
Unfortunately it fails randomly and my Petrel shows "bt sending packet
error".
No way to complete the download.
Subsurface download thread loops endlessly while the Petrel already quit.

Why I have to download all the dives from my Petrel while I miss only the
last three?

Would be nice if you could add a timeout during the transfer. I switched
off my petrel and tablet BT 30 minutes ago and Subsurface is still
waiting...

Would be nice if complete dives of a partial download could be saved so I
could download some of them at the time.
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: maps on iOS

2018-04-09 Thread Dirk Hohndel

> On Apr 9, 2018, at 10:45 AM, Hartley Horwitz  wrote:
> The map on iOS is working on my phone - at least the features I've tested:
> * opening a map, selecting satellite or map view
> * selecting a dive site and returning to the dive list - the selected dive is 
> chosen
> * changing zoom by gestures or using +/- icons
> * selecting a dive from the list, and choosing "Map It" icon
> 
> All my dives have GPS coordinates.  I tried adding a new dive without 
> coordinates and the "Map It" function is dimmed as expected.   I couldn't 
> figure out how to manually add the location using the map, but I didn't spend 
> long trying.

Thanks for testing and reporting. Really appreciated.

> Overall, things working well for me.  Thanks - the apps looks great. Now all 
> I need is a BT dive computer. 

And since you are testing on iOS, you actually need a supported BLE dive 
computer - that's even fewer to chose from.

/D

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


Re: maps on iOS

2018-04-09 Thread Hartley Horwitz
>
> -- Forwarded message --
> From: "Lubomir I. Ivanov" 
> To: Miika Turkia 
> Cc: Dirk Hohndel , Subsurface Mailing List <
> subsurface@subsurface-divelog.org>
> Bcc:
> Date: Sat, 7 Apr 2018 22:58:00 +0300
> Subject: Re: maps on iOS
> On 7 April 2018 at 07:35, Miika Turkia  wrote:
> > On Fri, Apr 6, 2018 at 10:58 PM, Dirk Hohndel  wrote:
> >>
> >> Thanks to Murillo we finally have a working map module on iOS as well.
> >
> >
> > Great!
> >
> >>
> >> If you are registered for TestFlight you should have received a
> >> notification.
> >> If you aren't (or didn't) and would like to play with this, please drop
> me
> >> a line.
> >>
> >> Overall iOS is still our smallest user group with the fewest people
> >> actively
> >> testing - so if you have access to an iOS device, I'd really appreciate
> >> some
> >> feedback.
> >
> >
> > Initially the map seems to be working OK. At least it shows the dive I
> have
> > chosen from dive list.
> >
> > It appears that one cannot choose location for a dive that does not
> contain
> > any GPS coordinates. Looking at options for a dive with coordinates, it
> > appears that this might not be supported on mobile at all.
> >
>
> i must admit that i didn't test adding GPS to a dive that doesn't have it.
>
> if editing coordinates from the dive details creates a `dive_site`
> object and adds it to the list of dive sites, then the map will create
> a marker for it once re-opened / reloaded. that's how the map backend
> works on desktop and mobile.
> editing the coordinates of a dive with GPS did work the last time i've
> checked.
>
> > I wonder if both the mapit icon and gps icon at the bottom are both
> > required. Maybe just getting rid of the button at the top right corner?
> >
>
> hmm, i'm not sure which one is the GPS icon.
> i was only using the "map it" button on top of the dive details to open
> the map.
>
> > How is the choosing of shown dive sites supposed to work? Does it make
> any
> > sense on mobile? I can highlight the dives shown on the map, but they
> don't
> > seem to be selected when I return to dive list. If there is no proper
> > need/use for choosing multiple dives on mobile then maybe disable this
> > options from the map. Or do we somehow support editing multiple dives on
> > mobile?
> >
>
> selecting multiple flags on the map or selecting multiple dives in the
> dive list is not possible on mobile.
> selecting a flag from the map should select a single dive from the
> dive list (latest dive on that dive site).
>
> maybe you found a bug, because at least a couple of people confirmed
> that the selection works when this was merged.
>
> lubomir
> --
>
> The map on iOS is working on my phone - at least the features I've tested:
* opening a map, selecting satellite or map view
* selecting a dive site and returning to the dive list - the selected dive
is chosen
* changing zoom by gestures or using +/- icons
* selecting a dive from the list, and choosing "Map It" icon

All my dives have GPS coordinates.  I tried adding a new dive without
coordinates and the "Map It" function is dimmed as expected.   I couldn't
figure out how to manually add the location using the map, but I didn't
spend long trying.

Overall, things working well for me.  Thanks - the apps looks great. Now
all I need is a BT dive computer.

...Hartley

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


Re: Documenting coding conventions for new comers.

2018-04-09 Thread Dirk Hohndel

> On Apr 9, 2018, at 3:26 AM, Miika Turkia  wrote:
> 
> To cope with this I've prepared a change introducing a new CONVENTIONS.md 
> file that is meant to collect such information: 
> https://github.com/Subsurface-divelog/subsurface/pull/1196 
>  Any feedback is 
> welcome. Since it is the one convention I learned during a recent pull 
> request I proposed, I started with documenting the use of membuffer for 
> string manipulations...
> 
> What is the distinction between the existing CodingStyle and the proposed 
> CONVENTIONS.md? IMO, what you currently have there could have easily been 
> included in the CodingStyle. Having all the essential information in single 
> place sounds better for newcomers.

I think I'll have to agree with Miika on this one. Fewer places to read through 
make it easier for people to find what they are looking for.
One could of course argue that using membuffer and other such conventions 
technically aren't coding style, but I think with a slightly more liberal 
interpretation of that term... simply add a section called "Conventions" to the 
CodingStyle document and I think we will all be happier :-)


> Then if/when the currently discussed pull request would be approved it would 
> be nice to reflect these changes in the corresponding page on 
> https://subsurface-divelog.org . The 
> question is: Was this page manually edited in Subsurface-website repository 
> or was it actually generated from markdown? If so, is the script available 
> somewhere?
> 
> IIRC these are edited directly.

The website is run on a WordPress instance that is synced (in a somewhat 
fragile manner) with a GitHub repo. So the sources for the page in question 
should be here:

https://github.com/Subsurface-divelog/Subsurface-website/blob/master/_pages/contributing.en
 


The translations of the website are unfortunately not as well maintained as one 
might hope (this is all volunteer work and it's tedious work...), but you can 
see the translations in the GitHub repo as well.

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


Re: Documenting coding conventions for new comers.

2018-04-09 Thread Miika Turkia
On Mon, Apr 9, 2018 at 12:41 PM, Jérémie Guichard 
wrote:

> Hi everybody,
>
> To cope with this I've prepared a change introducing a new CONVENTIONS.md
> file that is meant to collect such information: https://github.
> com/Subsurface-divelog/subsurface/pull/1196 Any feedback is welcome.
> Since it is the one convention I learned during a recent pull request I
> proposed, I started with documenting the use of membuffer for string
> manipulations...
>

What is the distinction between the existing CodingStyle and the proposed
CONVENTIONS.md? IMO, what you currently have there could have easily been
included in the CodingStyle. Having all the essential information in single
place sounds better for newcomers.


>
> Then if/when the currently discussed pull request would be approved it
> would be nice to reflect these changes in the corresponding page on
> https://subsurface-divelog.org. The question is: Was this page manually
> edited in Subsurface-website repository or was it actually generated from
> markdown? If so, is the script available somewhere?
>
> IIRC these are edited directly.

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


Documenting coding conventions for new comers.

2018-04-09 Thread Jérémie Guichard
Hi everybody,

It is not easy for new comers to know about conventions and best practices
to be followed when contributing to Subsurface. This creates overhead for
new comers and code maintainers.
New comers have to extensively browse the code to find utility functions
(or end up re-implement things that already exist), figure what should be
done where, etc... and often end up having to re-implement fixes since
original pull request do not follow Subsurface development common practices.
Code maintainers spend lot of time (re)explaining such practices while
doing code reviews.

To cope with this I've prepared a change introducing a new CONVENTIONS.md
file that is meant to collect such information:
https://github.com/Subsurface-divelog/subsurface/pull/1196 Any feedback is
welcome. Since it is the one convention I learned during a recent pull
request I proposed, I started with documenting the use of membuffer for
string manipulations...

I know that the majority of frequent contributors (that are the ones
knowing such conventions) do not have much free time to spend on describing
them. On my side I'm still pretty fresh with Subsurface development and do
not yet know much of them, but do currently have some free time to spend on
this topic. So feel free to post me a small note in this thread with some
of the conventions you know about, I'll happily prepare pull request with
detailed descriptions and examples.

While I'm talking about documentation for contributors, I have a question
regarding Subsurface website, more specifically the
https://subsurface-divelog.org/documentation/contributing/ page.
I've made a (already merged) change with a mention to the usage of
CHANGELOG.md https://github.com/Subsurface-divelog/subsurface/pull/1194
I have another one (to be reviewed) fixing few spelling mistakes:
https://github.com/Subsurface-divelog/subsurface/pull/1195
Then if/when the currently discussed pull request would be approved it
would be nice to reflect these changes in the corresponding page on
https://subsurface-divelog.org. The question is: Was this page manually
edited in Subsurface-website repository or was it actually generated from
markdown? If so, is the script available somewhere?

Wish you all a great day,

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