Commit graph

18851 commits

Author SHA1 Message Date
Dirk Hohndel
56ffa95459 mobile/user-manual: update date and version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-31 10:20:44 -07:00
Dirk Hohndel
12e59010eb Update translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-31 10:11:03 -07:00
Dirk Hohndel
faf349bbda prepare for 5.0.1
Update README and ReleaseNotes.

Also remove outdated workflow badge, add a couple new one, and hack around a
rendering issue where the last character of longer workflow names gets
overwritten by the status - which resulted in the arguably most important info
(which Qt version) being hidden.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-31 09:07:01 -07:00
Berthold Stoeger
991d1bdf19 profile: fix color on pressure-item
The "in_planner" condition was inadvertently inverted in
c6d78bc134 and therefore the wrong data was used to draw
the line (density instead of SAC). Revert to original.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-31 08:48:38 -07:00
Dirk Hohndel
0521f79fae build-system: make ASAN builds easier
This is a bit lacking sophistication (you need to remember to make clean
before rebuilding when changing this option, etc), but it works well
enough for my purpuses.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-31 08:03:04 -07:00
Berthold Stoeger
a988e3c135 core: initialize dive selection after resetting the data
The dive selection was initialized during data-reset. However,
this emitted a signal before all data-reset routines were run.
Ultimately, this led to access-after-free in the statistics code.

Instead, move the select_newest_visible_dive() signal from the
divelist-model to the process_loaded_dives() function. There
is no point in initializing the selection if the dive data
is cleared after all.

This change broke closing of the log, because the UI-selection
was not reset. Therefore, when clearing the data, clear the
selection before proceeding with clearing.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-31 13:54:23 +02:00
Berthold Stoeger
f299fa37f9 stats: fix visibility check of the statistics tab on desktop
Apparently, the visibility flag of the view is not inherited
from the statistics widget. Therefore, the statistics is
redrawn on every action even if not visible.

Set the visibility explicitly in the show- and hide-events.

This is crazy.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-31 13:41:39 +02:00
Dirk Hohndel
01fb69e198 tests: fix incorrect relative path names
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 11:47:48 -07:00
Robert C. Helling
1c8c6f9551 Add test for profile in VPMB mode
For some reason, this test seems not to run effectively, at least
locally, I had to update the reference file.

Added a check that indeed the file to be compared was
successfully opened.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-03-24 10:30:22 -07:00
Berthold Stoeger
d0494beb5f planner: fix deco calculation
In 9bfc6d252, testing of the planner was changed to use the
planner_ds parameter instead of a global variable.

Unfortunately, two conditionals were inverted, leading to
an erroneous ceiling calculation when in the planner.

Restore the proper conditions. Moreover, instead of testing
the planner_ds parameter, use the already existing in_planner
flag, which is derived from said parameter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-24 10:30:22 -07:00
Dirk Hohndel
289cf3f9c5 prepare for Subsurface 5.0 / Subsurface-mobile 3.2 release
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 10:07:24 -07:00
Dirk Hohndel
f9569cac7c mobile: update version to 3.2.0
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 10:01:00 -07:00
Dirk Hohndel
b90dbd71f2 Update Supported Divecomputers list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 09:59:09 -07:00
Dirk Hohndel
e376d6eb70 Update translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 09:55:16 -07:00
willemferguson
126decac6b User manual: Create new cylinder type
Adds text and 5 images, detailing how to create a new cylinder type.
This appears to be a perrenial problem, often appearing on the mail
list.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-24 09:47:50 -07:00
Robert C. Helling
7c62f7541c Use PSCR gas when computing O2 toxicity
Both the calculations for CNS and OTU did not take
into account the pO2 drop when using a PSCR. Furthermore,
there was some unit confusion due to not using internal
units.

Reported-by: arosl
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-03-12 22:24:23 +01:00
Andreas Buhr
41fc822d56 Use QtBluetooth enums from their namespace
For increased type safety, some enums have been changed to
scoped enums in Qt 6.2, see
https://codereview.qt-project.org/c/qt/qtconnectivity/+/337069
https://codereview.qt-project.org/c/qt/qtconnectivity/+/336678
This patch adapts subsurface to this change.
Since C++11, enums inject their symbols in both their own
and their parent namespace, so this patch can be merged right
now.

Signed-off-by: Andreas Buhr <andreas.buhr@qt.io>
2021-03-12 08:41:31 -08:00
Dirk Hohndel
9686b4cf74 documentation: gentle nudge back to standardized US-English
Just changing the two user manuals. This also includes a couple other spell
fixes as well as one small adjustment regardinf IrDA support on Linux (which
has been gone for a while now).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-03-11 08:12:40 -08:00
willemferguson
d75a051721 Update to desktop user manual
Add section dealing with statistics restricted graphing.
Add section dealing with lack of IrDA support on new OSs
Do spell check of complete text.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2021-03-11 16:23:36 +02:00
Berthold Stoeger
5ba6db80cc parser: initialize picture variable
When parsing "event 123" (?) a picture is added, without
initializing the picture structure. Thus, a picture with a
random gps location is added.

Use the "empty_picture" initializer to avoid that. Fixes a
Coverity warning.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-08 16:29:04 -08:00
Berthold Stoeger
d1c89a55e1 stats: initialize InformationBox::width and height members
Fixes a Coverity warning. Good style anyway.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-08 16:29:04 -08:00
Berthold Stoeger
7446e8cddd statistics: don't divide by totalCount = 0 in pie charts
This silences a Coverity warning. In principle, this should
never happen, since there are no slices if totalCount is 0.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-05 09:35:13 +01:00
Berthold Stoeger
3fcac9022c profile: initialize DiveEventItem::dive to null
To simplify debugging, this should be initialized. Found by coverity.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-05 08:30:23 +01:00
Berthold Stoeger
9655417ad3 stats: initialize PieSeries::radius to 0 in constructor
This silences a Coverity warning. That what harmless, but
it's probably good practice to initialize all members.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-03-05 08:22:19 +01:00
Michał Sawicz
6dccfc75dc [gha] simplify LXD handling 2021-03-01 12:48:11 -08:00
Robert C. Helling
345959177f Max ceiling precision
We used to round the ceilings for the individual tissues with
%.1f but the maximal (and thus effective) ceiling only with
%.0f. This makes no sense or be rounded up (to the conservative
side).

This commit shows also the maximal ceiling with higher accuracy.

Reported-by: Peter Hübner
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-03-01 21:33:25 +01:00
Michał Sawicz
a72f2ac92d [snap] use setup-lxd action
The Snapcraft action unnecessarily tries to migrate things.

Signed-off-by: Michał Sawicz <michal@sawicz.net>
2021-02-26 09:57:24 -08:00
Robert C. Helling
fdcfcb1b32 Get O2 right in bailout mode
When doing OC bailout from a CCR dive, there could still
be pO2 sensor readings but those are not valid.

This fixes a problem noticed by Justin Ashworth.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-02-26 08:42:30 -08:00
Robert C. Helling
fb11f8efa6 Describe CCR changes in documentation
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-02-26 08:42:30 -08:00
Robert C. Helling
2064ce06cc Fix pO2 for CCR at shallow depths
Even when diving a CCR, the pO2 cannot exceed ambient
pressure. This only makes a difference at shallow depths.

Fix this in the calculation of OTUs and CNS.

This affects some tests that now have slightly different CNS and OTU values.

Suggested-by: Justin Ashworth
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-02-26 08:42:30 -08:00
Robert C. Helling
6b8a07f0d9 Planner: Depth dependent setpoint changes in CCR mode
We had a user request to allow for setpoint changes
at certain depths for CCR deco.

You can now enter a cylinder with name like
"SP 1.4" ('S' and 'P' and ' ' and a float) with
a switch depth and that cylinder is interpreted as
a depth dependent setpoint switch.

This user interface is a hack. But I believe that such
setpoint changes are similar enough to gas switches during
deco and should thus be handled in a simiar manner.

I would be happy to hear ideas how this could be made
less easter eggish.

Suggested-by: Justin Ashworth
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-02-26 08:42:30 -08:00
Dirk Hohndel
5595a70bd5 documentation: automate creation of web facing manuals
We already had the script to post-process the HTML files in the repo,
but we didn't automate use of that script in the Makefile. The .wp
suffix is misleading and historical (we no longer us WordPress), but
it's what I am used to and I didn't come up with something more obvious
or better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-24 12:23:05 -08:00
Willem Ferguson
a651bb4550 mobile/manual: small changes to improve mobile manual
Better image placement, other small changes.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-24 10:03:12 -08:00
Willem Ferguson
cd8eb274e3 mobile/manual: tuning of header sizes
This makes all the font sizes relative and avoids odd effects on some browsers.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-24 09:54:43 -08:00
Dirk Hohndel
68c56751c4 mobile/manual: small style change to fit pictures
This way they don't exceed the page size.

This also removes execute bits from a couple of pictures. That's just wrong...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-21 12:42:10 -08:00
Dirk Hohndel
74021afd97 build-system: don't check dependencies when creating Ubuntu package
There is no reason to check that on the system that is simply used to
submit the package to Launchpad.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-02-17 09:07:20 -08:00
Berthold Stoeger
5b3cb5898f desktop: fold ApplicationState into MainWindow
The application state is a desktop-only thing. The mobile UI
also has its application state, but that is something completely
different.

The last remaining user of the application state was to flag
whether the planner is active. Since this has all been
unglobalized, the ApplicationState structure can be moved
from core to the desktop UI. And there it can be made local
to the MainWindow class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
80c92acc33 cleanup: remove setAppState from TestPlan
This is not needed anymore, since the planner passes down the
in_planner flag to the appropriate functions. The planner state
is not queried via a global anymore.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
42cff9b3a5 planner: pass in_planner down to TemplateLayout
The TemplateLayout prints different dives depending on
whether the planner is active. Instead of accessing a
global variable, pass the status down from the MainWindow.
That's all quite convoluted, since there are multiple
layers involved.

On the positive side, the in_planner() function has now
no users an can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
18049bc8d0 cleanup: remove unused includes in mainwindow.cpp
The printing code moved elsewhere, so these includes are not
needed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
c6d78bc134 planner: pass in_planner argument to replot()
To remove reliance on global state, pass an "in_planner" argument
to AbstractProfilePolygonItem::replot(). Thus, calls to in_planner()
can be removed.

This is a bit sad, since the in_planner argument is now passed
to numerous replot() reimplementations of classes derived
from AbstractProfilePolygonItem. However, it is only needed
for one, viz. DiveGasPressureItem. Well, perhaps in the future
more features will depend on the planner mode...

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
65720d2fce cleanup: remove function declaration
AbstractProfilePolygonItem::shouldCalculateStuff()'s definition
has been removed some time ago. Therefore, remove its declaration.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
642d9c80b3 planner: pass in_planner argument to decoMode()
To remove reliance on global state, pass an "in_planner" argument
to decoMode(). Thus, calls to in_planner() can be removed.

This is a more-or-less automated change. Ultimately it would
probably be better to pass the current deco-mode to the affected
functions instead of calling decoMode() with an in_planner
parameter.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
03a7e65cf0 planner: pass in_planner argument to clear_deco()
To remove reliance on global state, pass an "in_planner" argument
to clear_deco(). Thus, calls to in_planner() can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
8103e947aa planner: pass in_planner argument to vpmb_next_gradient()
To remove reliance on global state, pass an "in_planner" argument
to vpmb_next_gradient(). Thus, calls to in_planner() can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
93ecad1b04 planner: pass in_planner argument to add_segment()
To remove reliance on global state, pass an "in_planner" argument
to add_segment(). Thus, calls to in_planner() can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
Berthold Stoeger
9fb37ea27f planner: remove print_mode parameter from calculate_deco_information()
Only 'false' was ever passed as value.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-02-17 07:26:55 -08:00
willemferguson
9da9133372 Mobile user manual update: statistics
As the title says. This is a first pass because I cannot see what it looks like
on the mobile device if it has not been pulled into master. I need to see what
size the images have on the mobile screen and how the organisation of text above
and below the images is rendered. There will definitely be a second PR to refine
the content for the mobile screen and to ensure proper integration of the
statistics section with the overall user manual..

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2021-02-17 07:21:01 -08:00
Miika Turkia
baee988d75 As last resort, use the site name as location
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2021-02-17 07:04:25 -08:00
Miika Turkia
2936aa6aa0 Use country for divelogs.de export
This will use only the country name for the location field in
divelogs.de export. The old version concatenated all the fields
together. This is inline with Rainer's new import functionality.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2021-02-17 07:04:25 -08:00