Commit graph

10410 commits

Author SHA1 Message Date
Rick Walsh
3d8e5b638a VPM-B restore deco state before calculating next gradient
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>
2015-09-16 21:16:58 -07:00
Rick Walsh
95720e94ee VPMB gradient of imperm: don't confuse atm and bar
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>
2015-09-16 21:16:58 -07:00
Tomaz Canabrava
5b77b162a3 Remove the fb preferences page if build without fb
Somehow I broke this.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-16 21:16:58 -07:00
Tomaz Canabrava
d59e89e569 Make Facebook more user friendly
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>
2015-09-16 21:16:58 -07:00
Salvador Cuñat
e945134cc4 Unify use of Bühlmann spelling in user-manual.txt
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>
2015-09-16 21:16:58 -07:00
Salvador Cuñat
9fd7fc8b45 Use Bühlmann in all strings shown to the user
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>
2015-09-16 21:16:58 -07:00
Willem Ferguson
91fca9ddd5 Updates: user manual review (part 1)
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>
2015-09-16 11:17:20 -07:00
glerch
15049c3e06 Uemis downloader: code cleanup
Removing an unused variable

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-16 07:36:30 -07:00
glerch
e8ae51b876 Uuemis downloader: make sure import reacts to cancel
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>
2015-09-16 07:35:28 -07:00
glerch
9d56165fd1 Uemis downloader: new memory calculation
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>
2015-09-15 09:12:06 -07:00
Robert C. Helling
4a19145e04 Use the correct setpoint in planner
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>
2015-09-15 07:07:19 -07:00
glerch
4d7338fd50 Uemis - fixup debugging
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>
2015-09-15 06:49:39 -07:00
Guillaume GARDET
2610536064 Documentation: update french translation of user-manual
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-15 06:48:30 -07:00
Dirk Hohndel
3abb70855c Latest translations
And update latest translation sources (which have been pushed to
transifex).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-14 21:10:24 -07:00
Willem Ferguson
2dd52b4921 User manual update: Cloud services
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>
2015-09-14 21:01:10 -07:00
Willem Ferguson
d0b26c6e57 User manual update: Dive planner
1) Added text to reflect VPM-B dive planning
2) Replaced 5 images in dive planner chapter.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-14 21:01:07 -07:00
glerch
ebf26e067d Uemis - bugfix wrong variable addressing
Made a mistage when adressing a referenced variable

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-14 13:35:29 -07:00
glerch
277dbf2a67 Uemis downloader: more code restructuring
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>
2015-09-14 13:22:35 -07:00
glerch
9921f32f80 Uemis downloader: code restructuring
In order to make the code more readable and easier to debug, this moves a
logical block into its own function.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-14 13:21:14 -07:00
glerch
29d43531d2 Uemis bugfix
Fixed a bug in do_uemis_download when cleaning up delted dives. My
test for valid dives was wrong. now counting the nr of dives in the
download table.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-14 07:35:01 -07:00
Miika Turkia
1e8ea9061e Test case: compare DLD log with a saved one
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:28:04 -07:00
Miika Turkia
1153f81856 Test case: control log for DLD import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:27:59 -07:00
Miika Turkia
0160e58e7d Test case: reading zip and DLD parsing
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:27:54 -07:00
Anton Lundin
3fb017a1c3 Store the number of detected o2 sensors
To make our logic to handle o2 sensors do usefull things we need to
inform it of the amout of o2 sensors we got.

This saves the max number of PPO2 samples we got from libdivecomputer as
our number of o2 sensors.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:27:39 -07:00
Anton Lundin
ba8b7c6c27 Remove leftover bits between sensors and setpoint
Previously subsurface treated DC_SAMPLE_SETPOINT and DC_SAMPLE_PPO2 the
same way.

Back in "Store DC_SAMPLE_PPO2 as a o2 sensor", and "Support multiple o2
sensor values from libdc", i changed that and started to treat
DC_SAMPLE_PPO2 as the o2 sensor values they are.

The po2 variable there was a leftover from when ppo2 and setpoints where
treated the same way, and should be removed.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-13 15:26:42 -07:00
Anton Lundin
9f629b5e2e Change OSTC 3 config option to current models
Our OSTC 3 config code works for all hwOS devices, so be more clear when
saying that as the chooser option.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 14:02:42 -07:00
Anton Lundin
5472036931 Connect up custom serial in dc configuration
This connects up the custom serial code in the configure dive computer
dialogs.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 14:02:32 -07:00
Anton Lundin
a42df06dbf Lift dis- and connect out from config operations
When working with ostc's via bluetooth, they will reboot and exit
bluetooth mode when you send the disconnect command. Thats kinda
inconvenient when you would like to read your settings, change something
and write it back, you need to start bluetooth mode on your device
twice.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 14:02:12 -07:00
Miika Turkia
f38f8ce4c9 Add importing of working pressure from divelogs.de
We were missing the import of cylinders' working pressure when syncing
with divelogs.de. This piece of information is required for proper unit
conversions when user uses imperial units for displaying the
dive information. (Both Subsurface and divelogs.de use metric
internally, or at least the export from divelogs.de is in metric.)

See #907

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 12:36:26 -07:00
Sander Kleijwegt
6427564d33 Hide current dive site from dive sites with same coordinates.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 08:28:13 -07:00
Sander Kleijwegt
8dafc32228 Remove id from divelocation selection list
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 08:24:51 -07:00
Salvador Cuñat
7331cdad2f Update spanish translation of user-manual to english 0dd32d3
Easy access to cloud storage.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 08:24:10 -07:00
Salvador Cuñat
33bede660c Update spanish translation of user manual to english e4c0f3f
- Dive sites
- Printing
- APD CCR
- Sections reorder
- Images update

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 08:24:03 -07:00
Rick Walsh
304edb63ce VPM-B: Calculate ceiling in deepest portion of dive
The Boyle's law compensation compares the ambient pressure to a baseline value,
and adjusts the theory bubble radius accordingly.  Currently we use the ceiling
at the last user-entered waypoint (the start of the decompression phase) as the
baseline value.  However, in a deep to shallow multi-level dive, decompression
can start earlier, and taking a shallower ceiling leads to a more aggressive
ascent.  This is particularly noticeable if the user enters stops during ascent.

With this commit, we take the baseline ambient pressure for Boyle's law
compensation as the deeper of the:
(1) Ceiling prior to ascending during a user-entered portion of the dive, and
(2) Ceiling at the start of the last user-entered waypoint.

This makes the calculated profile more conservative for some deep to shallow
multi-level dives.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 08:20:10 -07:00
Dirk Hohndel
af66ad9b6d CSV import: strip whitespace from column names before matching
In a user provided sample the last column name included "\r\n" which
prevented us from automatically matching that column.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 11:10:36 -07:00
Dirk Hohndel
c41810e5a5 When editing a manually added dive, correctly update max depth
The fixup_dive() function assumes that values that are set already in the
divecomputer and dive structures come from a reliable source - sometimes
dive computers are able to track a maximum depth continuously, so that
value can be larger than the deepest sample and we need to honor that.

But in the case of a manually added dive, the samples define the dive. So
in this case we need to reset the values that were calculated when the
dive was first added so that the user can then edit the dive and reduce
the maximum depth reached in the profile and have that reflected in the
dive list.

Fixes #926

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 10:54:05 -07:00
glerch
30f81949a0 Uemis downloader: code optimization
Cleaned up the code in do_uemis_import, this way it should
run a little faster as I am doing the check if the returned
divespot is valid at an earlier point

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 10:29:49 -07:00
glerch
4e64b327f3 Uemis downloader: cleaning up debug bits
At some point I would like to understand the logic behind
the debug bits, so I am not messing around with them.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 09:21:59 -07:00
Robert C. Helling
654a7be834 Add checkbox to force images to match dives
Give the user the possibility to attach images to a dive even
when the times do not match

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 09:18:55 -07:00
Robert C. Helling
5a1c041b78 Don't offer gas selection for the last waypoint in planner
Since the gas selection list on a waypoint refers to a gaschange there
influencing the following segments, there must not be a gas selection
on the last manually entered waypoint since from there the planner
handles the gas selection.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-11 09:15:14 -07:00
Anton Lundin
f93c60fc1e Configure divecomputers: remove unused member
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:37:21 -07:00
Anton Lundin
c0c4b5c4b3 Configure divecomputers: add delegates for setpoint configuration
This adds delegates to simplify configuration of setpoint values in the
OSTC's.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:37:13 -07:00
Anton Lundin
444d0d6693 Configure divecomputers: access table data the same way as its set
The table data is set via role, so retrieve the data via role too.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:37:05 -07:00
Anton Lundin
e70b33a56b Configure divecomputers: fix spelling of First
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:36:54 -07:00
Anton Lundin
906cc8804d Be compatible with libgit2 0.22 again
The callback function was introduced in 0.23, so put it behind that
ifdef.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:30:12 -07:00
Dirk Hohndel
948c77bfad Get ready for OS X 10.11 El Capitan
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 13:18:43 -07:00
glerch
682e23775c Uemis downloader: bug fix in uemis set dive location
Assuring that ds isn't NULL, had a few cases
that made SubSurface crash. Have not investigated
the root cause but it's likely that it is related to
the Uemis specific code. Nevertheless, checking ds
non NULL is certainly not a bad thing to do.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 12:44:12 -07:00
glerch
dc02a7aa6d Uemis downloader: remove memory leaks
Found more memory leaks

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 12:33:49 -07:00
glerch
6504d97ca8 Uemis downloader: assure empty divespots are not added
If the load_uemis_divespot returns false we must assure
we delete the divespot that was created during process_raw_buffer

Also added some comments

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 12:33:22 -07:00
glerch
1aa941e754 Uemis downloader: remove code not needed anymore
Cleaning up track_uemis_divespot because this function is not needed
anymore.

As I am loading the divespots now within do_uemis_import, I also adjusted
the memory calculation - this is not completed yet.

Signed-off-by: glerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 12:32:23 -07:00