The merge_one_sample() function adds a sample to the destination
dive if dives are merged. For long periods between samples at surface
depths, it adds a surface interval.
To decrease the number of global objects, make the sample structure
non-static. Of course, initialization of an on-stack structure is
slower. Therefore move it into the corresponding if. Thus, the
structure will be initialized only once per surface-interval.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Unit_system is read from git storage but units are set from locale when the
app starts. To prevent a miss-match between unit and unit_system we have to
always update the preferences variable when set_unit_system is called so that
the user doesn't end up with imperial units when the preferences say metric.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The unit types are set from system locale when the app starts.
We need to explicitly set the units to match the unit system that is saved in
the git repo. Or we end up with situations where the preferences and git say
"metric" but the units are "imperial".
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When starting the app in "No cloud mode" we need to make sure that the units
and unit_system match.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the option for the user to set the desired unit system for
Subsurface-mobile regardless of system locale
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Trivial rename of a UI string. The string "Subsurface GPS data webservice"
reminds me too much of the legacy webservice.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Apple app store rules prevent even testing a binary with the same version as one
that has been submitted for release.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As the base EN user manual went forward, the NL translation was hardly
updated fror almost a year. Do I took all the changes over this period
and corrected the NL translation accordingly. So, its synced and up-to-date
to version 4.8.2 of the software (assuming the EN version is).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The MobileGpsMenu.jpg image was way to big in the generated html and pdf
versions of the manual. Corrected here.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
These changes complete (I hope) the updates to the user manual to reflect
the use of media including video. Nine images are replaced.
Some more updates in the user-manual.txt to reflect on video files
and not only photographs.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Using dc_serial_open as a fallback to ftdi_open is just wrong, and will
never work, just mask the real error and introduce read herrings.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Replace a very outdated screendump related to Preferences-Network,
and one for the new anonimize export option.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Tried to strip all referencews to the companion app. Including a remark of
end-of-life of the GPS webservice end 2018. Also fixed a screendump from
mobile, for the removed menu items of the GPS service.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update menu section for removes menu options. And fixed a lefover
edit in this area.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This updates the user manual with text on the addition of and
viewing of media, including video files.
5 images are replaced
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of editing appdata/subsurface.appdata.xml in place, switch to our usual
pattern of modifying a .in file and add the resulting file to .gitignore.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The << alternative can reallocate the vector, but we know it's size, so
preallocate.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Unamed namespace behaves the same way as static variables in C source.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A minor change to the UI. The wording of the two items in the dive
list context menu "Load image(s) from file(s)" and "Load
image from web" are updated since we now deal with both images
and videos. So it becomes "Load media from file(s)".... etc.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Nowadays, we edit dives just by starting to enter data for the dive.
There is no need to explicitly ask to start editing the dive, using the
now removed menu option. This was a left-over of a long past history.
This is fallout from PR #1673.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
These also showed up as concerns when creating translation strings.
Adding them thankfully didn't create new strings, but not having them
potentially leads to incorrect runtime behavior.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>