The data are supposed to be sorted with monotonous time stamp. And while
the actual bug that causes this needs to be identified and fixed, this is
at least a stop gap measure that shows the issue and prevents Subsurface
from hanging.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The logic to pick the initial dive ID for the uemis downloader was very
confused, and did not work at all when restarting a download when the
Uemis filled up, and the "Force download all dives" flag was set. It
also required a rather odd Uemis-specific callback from the download UI
because of how it picked the initial ID.
This changes the logic to just look at the list of downloaded dives when
restarting, which simplifies the logic a lot, gets rid of the odd
special callback, and also means that the whole "Force download" issue
just goes away. It seems to work now.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Uemis downloader blindly just did a strstr on 'nds->name', even if
there wasn't necessarily a dive location at all.
Add the proper NULL pointer checks.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On some Windows platforms when we convert a Bth address to a String
it is formatted as "(XX:XX:XX:XX:XX:XX)". Therefore we first try to
remove the round parentheses and finally we truncate the string
to 17 because there are 6 two-digit hex values and 5 colons.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't overwrite existing data.
[Dirk Hohndel: rewrote this a litte, but the logic is the same]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Changing the logic to check if a divespot was already read in
this round of reading in dives.
Signed-off-by: Guido Lerch <glerch@Guidos-MacBook-Air.local>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I hate this patch. But it makes no sense to expose users to git level
error messages. So this is trying to make things much easier (and,
frankly, less informative) if we are accessing the Subsurface cloud.
The way this is implemented is really ugly; it tries to avoid frequent
repetition of the same strings by using different exit points for the
functions in question. I'm not convinced this was the best way to do it
but it's what I have.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Spell Setpoint without space in user visable strings.
Explain authorized_paired.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Up to now, we only computed hashes of images upon actually displaying the images.
With this patch we start to compute hashes once we load the xml or from git. This
happens in the background, so the user should note an increased CPU load only once
per divelog.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implemented suggestion from Dirk on how to deal with dive details
not being found.
Also cleaned up some unused variables, got rid of the last_log_file_nr
because it's not needed anymore.
One thing in question I still need to check is whether we really need to
decrease the dive_to_read if we find deleted dive details, this is still
in but I dont think it's really needed.
Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now inplace edit is supported, so enable editing the "Default"
statistics template, Also show warning when editing this template.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When editing a bundled template show warning message.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Edit the templates into the same file, which is more intuitive as
Custom.html is a bit confusing.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The next gradient calculation at the start of the CVA loop should be performed
using the tissue loading before starting the iterations, rather than the loading
at the end of the previous iteration.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Other VPM-B implementations (V-Planner, MultiDeco, Fortran code) take the
default gradient of onset of impermeability as 8.2 atm. We use bar as the
pressure unit, and 8.2 atm = 8.30865 bar.
This has negligible effect on all of the calculated plans I've tested, resulting
in a maximum decrease of 1 minute in total dive time for ~150 m deep dives, but
we should get unit conversions correct anyway.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The current way that facebook works is terrible: it's scattered
around tons of files ( at least 4 different files and classes )
this moves things around a bit, add a disconnect button that
was missing, cleans tons of code and fix inconsistencies.
I will also redo this part for 5.0, but it's too late for 4.5
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also modified user-manual_fr.txt.
Russian and spanish translations didn't have any occurrence of Buehlmann
nor Buhlmann.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Unify spelling of this name in strings shown to the user, as commented
in mailing list. Internal coding use untouched.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Systematic review of existing text (part 1)
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixed a bug where the import did not react on the cancel button by adding
the check into the helper function as well.
Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
New calculation doing better UEMIS memory handling leading into more
dives being loaded at the same time while assuring we are not overrunning
the memory.
Also added the dialog message back, this was actually a bug I missed
introduced in one of the earlier patches
Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There is an unfortunate convention that the sample structure contains a setpoint
at its end rather than during its duration which causes the expression
sample[-1].setpoint in several places. This adds another one for the planner
to use the correct setpoint during the manually entered leg of the dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
No actualy code changes, just some small chnages within the debugging
such as removing reference from my /User/glerch/ home dir etc.
Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This ammends the existing text on cloud services.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Another helper function to make things easier to read - but actually even
this helper is still quite complex so I'm not done yet as I'd like to
simplyfy this even further.
Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>