Commit graph

19619 commits

Author SHA1 Message Date
Dirk Hohndel
dee49979d1 publish the result in the nightly-builds repo
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
d2f2f22dc1 don't build the macOS version twice on GitHub
We need some additional options when building the package, so let that script
handle the details and use the generic build script mainly for the dependencies.

Also let's not mix building for testing and building the DMG - just so I can
stay somewhat sane.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
3a98b8a722 more macOS build fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
b070b32e93 latest libftdi requires confuse
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
f5c1f7204a use current version of libftdi1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:54 -08:00
Dirk Hohndel
2ffba35d45 Build a macOS DMG in a GitHub Action
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-10 17:23:42 -08:00
Dirk Hohndel
e26dd30165 remove references to the test branch
This was useful as it helped to more quickly iterate through tests, but long term
isn't what we want.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 18:10:32 -08:00
Dirk Hohndel
1d150b106d create the APK with an apk build
Using the apk that is built as a side effect of an aab build does not work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 17:39:32 -08:00
Dirk Hohndel
6bbade9845 only create releases on push
Pull requests can be triggered by anyone - we should not publish code
that comes in through pull requests to either GitHub releases or
Launchpad, Copr, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 10:10:26 -08:00
Dirk Hohndel
f0ef8b51fc Fix Android APK renaming
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 09:53:25 -08:00
Dirk Hohndel
e95fbb7279 adjust upload globs
Hopefully this will deal with all future naming changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 04:14:22 -08:00
Dirk Hohndel
f252af1dd1 prevent the 'latest' tag from messing with our version
We need to use git describe in a way that only refers to vX.Y.Z style tags.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 04:00:32 -08:00
Dirk Hohndel
c609bc9446 more logical naming for the Android apk
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 03:27:54 -08:00
Dirk Hohndel
c0c361f40f more logical naming of Windows artifact
And make sure the latest tag ends up on the right sha.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 02:57:30 -08:00
Dirk Hohndel
2d63591ab8 build Windows artifact with new container
This should get us a current version of Qt and many other newer libraries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:47:27 -08:00
Dirk Hohndel
9cfe656342 update MXE build container
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:33:08 -08:00
Dirk Hohndel
2463b315bb Create GitHub release with Windows artifacts
This is using the outdated existing build container. Updating that one should
be next on the todo list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:33:08 -08:00
Dirk Hohndel
cc5a5a22bd add Android .apk to release from GitHub Action
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-07 01:33:08 -08:00
Dirk Hohndel
b0228b51ed launchpad build: link against dynamic libgit2 system library
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
b05d15933f add Fedora COPR to the README
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
41b5bbb226 add Launchpad PPA build
Could it be this easy? There's no way it's this easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
243d6bfd2b stop building our own libgit2 for Ubuntu
It's embarrassing that we kept doing this for so long. Debian and Ubuntu
have had new enough versions of libgit2 for a very long time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
8e212c0858 Fedora Rawhide builds fail without stdlib include
Implicit declarations of malloc, free, atoi, and others are considered an
error now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
8bf8f18962 trigger Fedora COPR build from GitHub
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Dirk Hohndel
8192379a84 update INSTALL for Debian Bookworm
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-12-04 12:55:10 -08:00
Micha WERLE
c612641517 fix: actually default bottom gas to air
If there are no gas mixes returned by libdivecomputer, we need to default to air. The previous commit would have defaulted to pure oxygen.

Signed-off-by: Micha WERLE <micha@michaelwerle.com>
2023-11-21 22:30:45 +13:00
Micha WERLE
4842344bc1 feat: extend bottom gas instead of last mix
During code review, an argument was made to use the bottom gas mix as
the mix to fill additional tanks with instead of the last mix reported
by the dive computer.

This change implements `get_deeper_gasmix` which compares two gas mixes
and returns the one with the lower MOD. This comparison does not perform
actual MOD calculations but only performs a  relative oxygen and helium
content comparison.

Instead of saving the last gas mix and assigning it to additional tanks,
a `bottom_gas` mix is saved and assigned instead.

Signed-off-by: Micha WERLE <micha@michaelwerle.com>
2023-11-21 22:30:45 +13:00
Micha WERLE
d0b95f9401 refactor: revert questionable optimisation
Reverted "optimisation" based on code feedback.

Firstly, it's implementation-defined whether or not a stack frame is created for sub-scopes, secondly any optimisation is questionable regardless, and thirdly it was felt that it makes the code harder to understand.

Signed-off-by: Micha WERLE <micha@michaelwerle.com>
2023-11-21 22:30:45 +13:00
Micha WERLE
c7171179b3 Core: extend last gas mix instead of defaulting to air.
Instead of defaulting to air when we run out of gas mixes to assign to
cylinders, use the last gas mix provided by the dive computer.

If no gas mixes are provided at all, then default to air.

This prevents Subsurface from "inventing" gas mixes which are not
reported by the dive computer. It also works very nicely with a sidemount
configuration where the dive computer typically reports two cylinders but
only a single gas mix.

Signed-off-by: Micha WERLE <micha@michaelwerle.com>
2023-11-21 22:30:45 +13:00
Dark Dragon
5c2e4c395b Fix AppStream ID
See https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html\#tag-id-generic

Signed-off-by: Dark Dragon <darkdragon-001@web.de>
2023-11-07 08:50:28 +13:00
Dirk Hohndel
ede732418b build-system: use gcc 10 for MXE builds
It's unclear if this will be enough to use gcc 10 by default when building
Subsurface using this container.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-11-06 07:56:05 +13:00
Jef Driesen
1abf400c63 Return the actual libdivecomputer error code
The divecomputer_device_open() function tries all supported transports
one by one, and exits as soon as one is opened successfully. When the
end of the function is reached, the DC_STATUS_UNSUPPORTED error code is
returned.

The annoying side effect is that the actual error code returned by the
transport is ignored and changed into DC_STATUS_UNSUPPORTED. This is
very confusing while troubleshooting download problems.

Fixed by initializing the error code to DC_STATUS_UNSUPPORTED, in case
no transport is available for trying, and returning the last reported
error to caller.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-11-05 06:54:40 +13:00
Jef Driesen
2a3c0d981f Add BLE detection for the Aqualung i330R and Apeks DSX
Add the Aqualung i330R and Apeks DSX model numbers to the Pelagic
pattern table. These two models also use a new BLE service UUID.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-11-04 23:03:09 +13:00
Jef Driesen
0d69758cac Add support for the Divesoft BLE service
The UUID of the Divesoft BLE service needs to be added to the list of
known services. It's a 16-bit UUID that gets detected as a standard
service and is ignored otherwise.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-11-04 23:02:54 +13:00
Michael Keller
07a028b14d Desktop: Simplify the get_dive_gas() function.
Remove branches that are always taken or make no difference, as proposed in
https://github.com/subsurface/subsurface/pull/3974#pullrequestreview-1674178375.

Signed-off-by: Michael Keller <github@ike.ch>
2023-10-20 17:16:05 +02:00
Anton Lundin
8d3f2e4ca6 Add another test for formatDiveGasString
This adds a test for the bug just fixed, where we have a trimix gas and
nitrox/air with less o2 than the trimix.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
94164bb8fa Correctly update mino2
When we've already seen a trimix gas, of we after that see a nitrox gas
with less o2, it shouldn't update the mino2 state.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
5444a6b65d Remove unnecessary QString
I thought it would solve the unicode issues I had, but it was
unnecessary.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
a681ff3410 Add even more tests for formatDiveGasString
Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
bba0da589b Add tests for formatDiveGasString
This adds tests for formatDiveGasString to ensure it produces the
expected results in some scenarios.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
725b70e64c Correctly find min o2 in get_dive_gas
When the import from a dive computer gives you 100% as the first gas,
the get_dive_gas never finds which gas had the lowest o2 percent.

This fixes the logic to find the lowest o2 percent in any dive cylinder
list.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
8f4b6cfcb9 Ignore not used cylinders in get_dive_gas
Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
fea074986a Ignore oxygen cylinders in get_dive_gas
It looks kinda strange that all CCR dives have a dive gas ..100%, so
rather than showing it as the dive gas used, just ignore cylinders
with usage flagged as oxygen.

Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-18 21:34:56 +13:00
Anton Lundin
b6111714b3 Use horizontal mouse wheel for zoomed panning
Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-13 21:41:41 +13:00
Anton Lundin
bfe61b2dff Add dive mode as possible column
Signed-off-by: Anton Lundin <glance@ac2.se>
2023-10-13 08:32:27 +13:00
Jef Driesen
c7b7c3f691 Add support for the new Ratio bluetooth name
The new Ratio iX3M 2 models use "RATIO-" as the prefix in the bluetooth
name instead of "IX5M".

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
2023-10-07 23:30:27 +13:00
Richard Fuchs
3c5f22ac25 Fix certificate_check_cb() return value
libgit documents the return value of callbacks.certificate_check[0] as
0 for success and <0 as failure. Returning 1 for success (kind of)
works because some parts of libgit[1] check for <0 return values and
only treat those as errors, but the function actually calling the
callback (check_certificate) treats anything non-zero as error[2] and
ends up setting a spurious error message with a return value of 1.

[0] https://libgit2.org/libgit2/#HEAD/group/callback/git_transport_certificate_check_cb
[1] https://github.com/libgit2/libgit2/blob/maint/v1.5/src/libgit2/transports/httpclient.c#L1054
[2] https://github.com/libgit2/libgit2/blob/maint/v1.5/src/libgit2/transports/httpclient.c#L785

Signed-off-by: Richard Fuchs <dfx@dfx.at>
2023-10-06 11:58:36 +13:00
Dirk Hohndel
c5feae126b truly switch to focal as oldest supported Ubuntu release
Thanks to @mikeller for catching my oversight here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-09-26 21:13:05 -07:00
Dirk Hohndel
947c2e704f remove unsupported versions and add newer ones
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2023-09-26 21:13:05 -07:00
Michael Keller
7165660a45 Fix Invalid Action Version Specification in Check USNs Workflow.
Fix Invalid Action Version Specification in Check USNs Workflow.

Signed-off-by: Michael Keller <github@ike.ch>
2023-09-27 07:42:49 +13:00