For the "crazy" long and deep dives in "TestPlan" an overflow happened here.
Rearranged the calculation to have more margin.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
It's unclear why this code was added in the first place - removing it
makes the highlight of the selected dive in the dive list work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In preferences->profile:
Move "bar" from text description to entry field (5x)
Move "l/min" from text description to entry field
Add suffix "%" to GF values
Rename VPM-B conservatism
In planner preferences:
Add prefix "+" to VPM-B conservatism
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Until now, we did the cylinder import based on its initial pressure (a
tank without pressure is an unused tank). Based in this assumption, we
just dropped those tanks whose initial press was 0, losing user
introduced tank definitions and getting some duplicities due to one
cylinder being numbered (e.g.) 2 by libdivecomputer and 3 by SmartTrak.
The new workflow is: get every single tank reported by SmartTrak (giving
preference to libdivecomputer parsed data), then clean the cylinder
table reverse order, dropping tanks without description and init or end
pressures, and checkig them against the previous cylinder to do a merge,
if they look the same, and try to avoid duplicities.
The new logic assumes a heavier workload for the benefit of lower data
loss (e.g. a user may get his/her tanks descriptions despite he/she
hasn't recorded their pressures because forgot the values or had an issue
with the gas transmitter).
Suggested-by: Alessandro Volpi <volpial@gmail.com>
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
In the past subsurface managed up to 8 tanks, but now it manages up to
20. SmartTrak manages 10 (3 in older no trimix versions) so there is no
more need to drop the last tanks.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
The cylinder info is built one by one. This way, instead of passing dive
and tank number parameters, just passing a pointer to the tank been
worked seems preferable.
It also introduces lrint() in the function to round the doubles values
obtained from libmdb for tank size and workingpressure.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Framed in a full rework of the cylinders info import management, this
funcs will be used in next patches.
Functions merge_cylinder_type(), merge_cylinder_mix() and
merge_cylinder_info(), have been shamelessly copied from dive.c as they
have been removed by 162767aa dated 2017-03-11 just when I was going to
use them.
Macros MERGE_MAX() and MERGE_MIN() have just been copied from dive.c,
but they could be moved to dive.h so they could be used elsewhere if
needed.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
As commented on mailing list. Most numerical values from libmdb are
doubles obtained via strtod(), so, rounding them instead of just
truncating seems the correct way.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
User can manually add bookmarks on the profile display of SmartTrak.
These are stored in a table with column names which made me think of
cartesian spatial coordinates. In the end the X coordinate is the time.
This makes possible to build subsurface events in those moments of the
dive. The other interesting data is just the text entered by the user.
Suggested-by: Alessandro Volpi <volpial@gmail.com>
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Fixes some memory leaks, most of them excesive use of copy_string() in
places where it was unnecesary.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Commits 25dcee139 and 6305361d14 change the user interface, and this
needs to be adapted in the user manual too.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The section on Dropbox is too verbose to my liking. The Subsurface
manual is not the place to elaborate extensively on something
external as Dropbox.
Removed a section.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The removed paragraph is not really correct. You do not have to select a trip
to access trip manipulation context menu items, and the behaviour of +/- buttons
is so well known and commonplace that the paragraph before is more than enhough
to explain this trivial feature.
Solution: remove paragraph
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This one little sentence confuses me: TTS is calculated assuming an ascent
surface air consumption (SAC) for the gas currently used.
Time to surface is a decompression + ascent time calculation only. Obviously, the diver
should plan to have suffient gas for this, but TTS is not a function of SAC. There is
the "remaining air time, RAT) some dive computers can calculate which uses TTS in
combination with SAC to assist the diver to start his ascent, but RAT != TTS.
Solution: remove the confusing sentence.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The info box for the dive profile is said to change to minimal when the
mouse pointer is outside the profile window. Testing this in 4.6.3 shows
that this is not the case. The info box does not change on window leave
of the pointer.
It might have worked that way before, but it is no big deal, so better to
change the manual to reflect the current working.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Generalize the wording. pSCRs are typically configured with a swichblock,
allowing insertion a any gas in the unit, equivalently with a gas change
on open circuit.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The fact that a pSCR is typically driven using nitrox is just flat wrong. A
pSCR can be considered as universal gas extender for any depth, so any driving gas.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
left and right clicking where stated incorrectly, so corrected this.
Also, a 1 letter typo on the same area corrected, not justifying a seperate commit.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The edit option of a dive location only allows for edit of the name,
not any other attribute. Corrected text.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The corrected text suggests that the Companion app deals with dives, but
it deals with locations of dives.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
It said: Now select the appropriate locations, then select the
tab in the upper right, afterAndroid device.
Unclear to me, so corrected to what is intended here.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The sentence: "Check the indicator at the top of the mobile screen for
internet activity, indicating the transfer of information" suggests something
that is very dependent on specific Android version and esp. settings of the
topbar icons.
Imho is better to remove this.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The function is unused, to silence the warning add the "unused"
GCC attribute to the function declaration.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use lrint() to fix both:
1)
core\planner.c:902:23: warning: conversion to 'int' from 'doub
le' may alter its value [-Wfloat-conversion]
2)
core\planner.c:907:21: warning: conversion to 'int32_t' from '
double' may alter its value [-Wfloat-conversion]
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Warning introduced in e8c918622f:
desktop-widgets\templateedit.ui: Warning: The name 'horizontal
Layout_3' (QHBoxLayout) is already in use, defaulting to 'horizontalLayout_31'.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The following pragma is Clang specific:
It produces a warning:
warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
Only enable it for Clang by checking the __clang__ macro.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>