Commit graph

19802 commits

Author SHA1 Message Date
Robert C. Helling
c47e28fa29 Dive mode for surface intervals
Divers breath air in open circuit mode during surface intervals,
not with their CCR.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2023-03-01 15:33:22 +01:00
Michael Keller
9aed18451a Desktop: Fix planner for CCR dives with first segment on OC.
Fix a bug that results in dive plans outside of the configured risk
profile being produced when planning a CCR dive with the first segment
set to open circuit.
`d->dc.divemode` is already set in `setRebreatherMode`, which is
sufficient, and congruent with the setting of other dive parameters,
like `diveplan.gflow`.

Signed-off-by: Michael Keller <github@ike.ch>
2023-03-01 15:19:40 +01:00
Michael Keller
cb5bc68c59 Desktop: Fix the number of progress steps in the OSTC4 download steps.
Changed the maximum number of steps for the progress bar to match the
number of steps that exist.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-26 21:31:27 +01:00
Dirk Hohndel
576595bb11 Merge branch 'translations_translations-subsurface-source-ts--master_en_GB' of github.com:subsurface/subsurface
Pull in the en_GB updates - calling that a translation seems like an
overstatement
2023-02-22 15:20:20 -08:00
Dirk Hohndel
3330f9001c Merge branch 'translations_translations-subsurface-source-ts--master_ro_RO' of github.com:subsurface/subsurface
Romanian translation
2023-02-22 15:20:07 -08:00
Dirk Hohndel
43da660220 Merge branch 'translations_translations-subsurface-source-ts--master_pt_PT' of github.com:subsurface/subsurface
Portuguese translation
2023-02-22 15:19:52 -08:00
Dirk Hohndel
a85abbedf6 Merge branch 'translations_translations-subsurface-source-ts--master_nl_NL' of github.com:subsurface/subsurface
Dutch translation
2023-02-22 15:19:38 -08:00
Dirk Hohndel
df6ec04e48 Merge branch 'translations_translations-subsurface-source-ts--master_es_ES' of github.com:subsurface/subsurface
Spanish translation
2023-02-22 15:19:23 -08:00
Dirk Hohndel
c438bce468 Merge branch 'translations_translations-subsurface-source-ts--master_de_DE' of github.com:subsurface/subsurface
German translation
2023-02-22 15:19:07 -08:00
Dirk Hohndel
12e6f219c9 Merge branch 'translations_translations-subsurface-source-ts--master_ca' of github.com:subsurface/subsurface
Catalan translation
2023-02-22 15:18:50 -08:00
Dirk Hohndel
fc1eab3fc8 Merge branch 'translations_translations-subsurface-source-ts--master_bg_BG' of github.com:subsurface/subsurface
Bulgarian translation
2023-02-22 15:18:23 -08:00
transifex-integration[bot]
4192cf2737
Apply translations in ro_RO
translated for the source file 'translations/subsurface_source.ts'
on the 'ro_RO' language.
2023-02-22 09:24:27 +00:00
Dirk Hohndel
e11c196a6a Update libdivecomputer
Merge upstream updates from Jef Driesen:

 - Deepblu Cosmiq+ support has been merged upstream

 - Oceans S1 support has been merged upstream

- Various new models supported: Cressi Donatello, Scubapro G2 TEK, new
  Excursion v6+ firmware.

- misc core changes, most notably supporting a new annoying specialized
  binary format for decomode, because Jef still can't deal with
  strings.

- lots of small details

(all the work done by Linus - I'm just adding this to Surface)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-20 12:02:25 -08:00
transifex-integration[bot]
ddb96efa87
Apply translations in nl_NL
translated for the source file 'translations/subsurface_source.ts'
on the 'nl_NL' language.
2023-02-20 19:22:02 +00:00
transifex-integration[bot]
7ffe4c67ef
Apply translations in bg_BG
translation completed for the source file '/translations/subsurface_source.ts'
on the 'bg_BG' language.
2023-02-20 09:19:42 +00:00
transifex-integration[bot]
30ca55be12
Apply translations in de_DE
translation completed updated for the source file '/translations/subsurface_source.ts'
on the 'de_DE' language.
2023-02-20 07:39:07 +00:00
transifex-integration[bot]
5aaafd1728
Apply translations in en_GB
translation completed updated for the source file '/translations/subsurface_source.ts'
on the 'en_GB' language.
2023-02-19 22:45:31 +00:00
transifex-integration[bot]
5069cda05a
Translate /translations/subsurface_source.ts in ca
translation completed for the source file '/translations/subsurface_source.ts'
on the 'ca' language.
2023-02-19 20:34:03 +00:00
transifex-integration[bot]
8766827c17
Apply translations in es_ES
translation completed for the source file '/translations/subsurface_source.ts'
on the 'es_ES' language.
2023-02-19 12:16:05 +00:00
transifex-integration[bot]
9867ff1ec5
Apply translations in pt_PT
translation completed for the source file '/translations/subsurface_source.ts'
on the 'pt_PT' language.
2023-02-19 11:22:43 +00:00
Dirk Hohndel
6b272ac3aa build-system: add Ubuntu kinetic (22.10)
That's been out for a while... oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-18 21:59:54 -08:00
Dirk Hohndel
2f29380ae2 build-system: attempt to fix transifex.yml syntax
Annoyingly I seem to only work with this if it's in the master branch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-18 19:22:19 -08:00
Dirk Hohndel
867ef10736 build-system: attempt to fix transifex.yml syntax
Annoyingly I seem to only work with this if it's in the master branch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-18 19:19:16 -08:00
Dirk Hohndel
8a56896c4b build-system: add GitHub Transifex integration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-18 15:38:45 -08:00
Dirk Hohndel
32c63f57ab Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-02-18 15:12:44 -08:00
Berthold Stoeger
3f2e4e8b16 cleanup: replace Q_FOREACH by range-based for in profile code
With Qt-containers, this might be a small pessimization, because
it might lead to a deep copy. This can be "fixed" by
   for (const Type &item: qAsConst(container))
But frankly, I don't care. Ultimately it is probably best to
replace the Qt containers by standard containers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-02-17 06:46:46 -08:00
Berthold Stoeger
4128fec1ea profile: register event names on creation of events
The event names were registered in add_event(). However,
the undo system did not use that function, but add_event_to_dc(),
which takes an already allocated event.

That gave the following unfortunate situation:

Load a log without setpoint changes.
Add a setpoint change.
The setpoint change event type now was not registered and
therefore couldn't be hidden.

Admittedly, a subtle bug, but still a bug. Fix by registering
event names on event creation.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-02-17 06:46:46 -08:00
Berthold Stoeger
0d3c9954f4 profile: redo eventname handling
The eventname handling code was splattered all over the place.
Collect it in a single source file and use C++ idioms to avoid
nasty memory management. Provide a C-only interface, however.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-02-17 06:46:46 -08:00
Michael Keller
ab7b9329c0 Standardised how divedatapoints are created.
Changed the way dive data points for OC cylinders to be added to the
dive plan are created in `createTemporaryPlan()` in
`diveplannermodel.cpp`. This now uses `plan_add_segment()` like all
other places where dive data points are added, in particular the planner
tests.
This also allowed for `create_dp()` to be made static.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-17 10:53:04 +01:00
Michael Keller
ec0c6833a0 Fix invalid bailout gas choice when planning a CCR dive.
Fixes a bug reported in
https://groups.google.com/g/subsurface-divelog/c/8N3cTz2Zv5E:
When planning a CCR dive with OC bailout, the diluent gas may be chosen
as the first OC bailout gas, despite being set up with a use type of
'diluent', and likely not being available for open circuit breathing.
`best_first_ascend_cylinder` is now initialised to an invalid value
(instead of the first cylinder, which may or may not be a diluent
 cylinder), and its subsequent use is guarded by a validity check.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-17 10:49:24 +01:00
Berthold Stoeger
eb5d4f2a15 desktop: fix multi-dive editing of cylinders
3629a87 changed the handling of cylinders in multi-dives edit.
Not only should the cylinders be the "same", but also at the
same position. The code did not check whether the edited dives
even had that many cylinders, leading to a null-pointer
dereference.

Check whether the cylinder exists before comparing it.

Fixes #3578.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-02-10 20:09:34 +01:00
Michael Keller
b4af03751d Improve accuracy of the 'unlikely dive gas' warning.
Change the values supplied in the warning to be fractions. This is what
is actually reported by libdivecomputer. The currently used thousandths
are hard to interpret for users, as they are only used internally in
Subsurface.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-09 05:18:56 -08:00
rmorris
a1a834568a Correct paths, to allow libmtp to build
Signed-off-by: rmorris <rmorris@rkmorris.us>
2023-02-09 05:17:23 -08:00
Michael Keller
40fc037aa4 Fix handling of gas type for CCR dives.
Fix bug introduced in #3576: On CCR dives cylinders listed as open
circuit bailout by the dive computer need to be set to `OC_GAS`.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-09 10:51:39 +01:00
Michał Sawicz (Saviq)
8fe5564059 ci: bring Snap USNs back
Ref. https://bugs.launchpad.net/snapstore-server/+bug/2004008

While that gets resolved, ignore the extra packages when checking for
security notices.

Signed-off-by: Michał Sawicz (Saviq) <michal@sawicz.net>
2023-02-08 07:48:34 -08:00
Berthold Stoeger
7b44689c8e parser: fix char-not-found checks in import-csv.c
These were two weird and clearly wrong constructs of the
type "if (iter && iter + 1)", where iter is a pointer. This
is always true at best and undefined at worst. Another
instance was removed in 096de0efd0.

The original code probably wanted to check whether the
found character was the last character in the string.
But that likewise seems to make no particular sense in
this context. Therefore, just remove the second part of
the boolean expression.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2023-02-07 23:43:04 +01:00
Michael Keller
1e3d378ad9 Cylindermodel: Improve editing of tank use
Use the drop down for editing the tank use in the gas list in both the
equipment tab and the dive planner.
The tank use column is now available in the equipment tab for all dives
and not just CCR dives, as 'not used' is a valid entry in both cases.
However, if the current dive is an OC dive, only 'OC-gas' and 'not used' are
shown.
There still seems to be a problem that in some cases, when opening the
planner after selecting an existing CCR dive the drop down in the
planner does not list CCR gas uses - for some reason `displayed_dive`
does not seem to be updated correctly on opening of the planner. But I have not been able to
reproduce this consistently, and changing 'Dive mode' fixes this.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-07 14:20:29 +01:00
Kim Delmar
1ed995aa7a html export: update CHANGELOG.md
Signed-off-by: Kim Delmar <62100831+KimDelmar@users.noreply.github.com>
2023-02-05 14:32:09 +01:00
Kim Delmar
3c771e2ee2 html export: fix diveguide display
Signed-off-by: Kim Delmar <62100831+KimDelmar@users.noreply.github.com>
2023-02-05 14:32:09 +01:00
Michael Keller
de4cad22b6 Desktop: Clarified the Dive Computer Firmware Update Message.
Clarified the message that is shown when a newer dive computer firmware
version is available, informing the user that
using an older firmware version may result in problems when using
Subsurface, as discussed in #3568.
This is currently only supported for Heinrichs-Weikamp dive computers.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-03 13:37:52 +01:00
Michael Keller
a92ee1e05d Refactoring: Use core functions to find gasmixes in TankItem.
Small refactoring to use `get_gasmix_at_time` from `core` in `TankItem`
to find the first gasmix used during a dive.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-03 08:24:56 +01:00
Michael Keller
72c40a18c2 Desktop: Fix brightness configuration for OSTC4
The Heinrichs Weikamp OSTC4 introduced an additional
'Cave' brightness level that is dimmer than all existing ones.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-03 08:22:13 +01:00
Michael Keller
321c8d92dc Improvement: Show gases as diluent by default for CCR dives.
Instead of adding all gases read from a dive computer as part of a dive
log as 'OC-gas', add gases as 'diluent' if the dive has a dive mode of
'CCR'. This creates consistency with the ppO2 for CCR dives being
tracked as sensor readings or a fixed setpoint, and not as the ppO2 of
the current gas ad depth.
A follow up question from this is whether gas use in the cylinders list
on the Equipment tab should be user editable. This seems to be
inconsistent at the moment, with gas constituent percentages downloaded
from the dive computer being editable, but gas use not.

Signed-off-by: Michael Keller <github@ike.ch>
2023-02-01 21:26:48 +01:00
Michael Keller
ada32f999e Cleanup: Remove 'data' field from 'DeviceDetails'.
`device_data_t data` in DeviceDetails has never been populated since it was first
added, and consequently is not used. This is confusing, especially as certain
fields inside `device_data_t` have been added directly to `DeviceDetails` in the meantime (e.g. `firmwareVersion`).

Separated from #3568 as per
https://github.com/subsurface/subsurface/pull/3568#pullrequestreview-1274995287.

Signed-off-by: Michael Keller <github@ike.ch>
2023-01-31 10:54:39 +01:00
Michael Keller
7ecc4c7034 Cleanup: Fix typos in comments.
Fixed some typos in comments.
Separated from #3568 as per
https://github.com/subsurface/subsurface/pull/3568#pullrequestreview-1274995287.

Signed-off-by: Michael Keller <github@ike.ch>
2023-01-31 00:03:06 +01:00
Dirk Hohndel
0ccb762a09 build-system: disable the daily Snap build for now
Apparently these currently end up in a rebuild loop.

Suggested-by: Michał Sawicz <michal@sawicz.net>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-01-27 09:25:55 -08:00
Michał Sawicz (Saviq)
a21cddc69a snap: use version: git
Snapcraft can determine the version from git on its own.

Signed-off-by: Michał Sawicz (Saviq) <michal@sawicz.net>
2023-01-19 10:37:48 -08:00
Michał Sawicz (Saviq)
e335c7a20d snap: fix GitHub Action warnings
`set-output` is getting deprecated, so need to move to newer ways.

Signed-off-by: Michał Sawicz (Saviq) <michal@sawicz.net>
2023-01-19 10:37:48 -08:00
Michał Sawicz (Saviq)
76c4b76027 snap: refresh for ubuntu-latest being 22.04
Signed-off-by: Michał Sawicz (Saviq) <michal@sawicz.net>
2023-01-19 10:37:48 -08:00
Martin Splitt
1b5de2d33b Update CHANGELOG.md
Signed-off-by: Martin Splitt <martinsplitt@google.com>
Signed-off-by: Martin Splitt <splitti@google.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-01-19 06:56:52 -08:00