Commit graph

18248 commits

Author SHA1 Message Date
Jason Bramwell
5c7a0027db Update INSTALL to correct PCLinuxOS packagelist
PCLinuxOS package list was stale, it contained a typo and also had missing
packages.

Signed-off-by: Jason Bramwell <jb2cool@gmail.com>
2020-09-29 11:54:59 -07:00
Dirk Hohndel
7547e90b41 gps: remove unused member function
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-29 16:25:44 +02:00
Dirk Hohndel
2a3a58a3c7 build-system: update OBS spec file
Just trying to keep things in sync with what we actually use in the automated
builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-28 11:19:21 -07:00
Dirk Hohndel
63cc2d864f build-system: document how to create a Windows installer
These are the instructions that I use at this point.

Removed a long obsolete script - it's been many, many years since that last was
useful (it was still using qmake to try to build Subsurface)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-28 10:38:08 -07:00
Dirk Hohndel
6835f03bae mobile: update version to 3.0.16
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-28 10:24:08 -07:00
Dirk Hohndel
a469dfa348 mobile/dive-list: correctly update view when changing dive date
If the dive timestamp changes, the dive could move in the dive list. But the
current dive actually doesn't change (it's still the same dive, right?). Yet
we need to update the dive list as well as the shown dive (especially if this
is after adding a dive, which is first inserted with the current time and then
updated with whatever the user enters).

Fixes: #2971

Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-27 14:16:18 -07:00
Jason Bramwell
927b008781 Updating INSTALL to bring it up to date for latest distro versions
Update INSTALL to improve installation instructions for Fedora
and Raspberry Pi.

Fedora
    Add 2 packages:
	bluez-libz-devel
	redhat-rmp-config

Raspberry Pi (untested)
    Bump version numbers to Buster/20.04
    Update package list to reflect Debian/Ubuntu
    Added:
	libbluetooth-dev
	qtdeclarative5-dev
	qtdeclarative-private-dev

Signed-off-by: Jason Bramwell <jb2cool@gmail.com>
2020-09-27 13:02:39 -07:00
Dirk Hohndel
e609950de0 documentation: layout change for README badges
I just think this looks nicer than having them across that many lines...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-27 06:22:26 -07:00
Jason Bramwell
c8ec4c5e6b documentation: update INSTALL file to add libbluetooth-dev etc
When attempting to compile under Debian and Ubuntu the build script would get
stuck looking for bluez. This change adds libbluetooth-dev to the suggested
install packages for Debian and Ubuntu.

Thus update also changes the yum install command in the Fedora instructions to
the newer dnf command as well as updating the versions listed of Debiand and
Ubuntu to the latest versions.

Signed-off-by: Jason Bramwell <jb2cool@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-27 06:17:49 -07:00
Dirk Hohndel
4089aa8b77 Update translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-23 10:58:44 -07:00
Berthold Stoeger
fb93232931 cleanup: silence two compiler warnings in git-access.c
gcc complained about two constructs of the kind
	remote_id && SSRF_INFO("...");
And while I am not a fan of excessive warnings, I must say
it has a point here. That's just code obfuscation. In fact,
it appears that the condition was wrong - the SSRF_INFO
should probably be invoked if remote_id is NULL. The way
it was written it would be invoked if it was *not* NULL.

Change both instances to unfancy if statements.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-22 14:10:12 -07:00
Berthold Stoeger
9d3b15bf9c translations: initialize water type strings at run time
The water type strings were static and therefore passed through
gettextFromC::tr() before main(). One would hope to get a warning
in such a case, but this is not the case.

Therefore, use the QT_TRANSLATE_NOOP macro to register the strings
in Qt's translation system and translate the list when needed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-21 13:42:00 -07:00
Dirk Hohndel
9ee85c0802 Update to current libdivecomputer
Fix memory usage bugs identified by Coverity
Fix salt/freshwater parsing for Mares Genius

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-21 12:33:05 -07:00
Robert C. Helling
ee79080280 Bailout segment is part of bottom time
The clock is only valid in ascent. In each cycle of the
'critial volume algorithm' it re-initialized to the
bottom time at the beginning of deco. So the time spent
on bailout should be added to this bottom time.

Thanks to Coverty for spotting this.

Coverity-scan:  CID-362079

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-09-21 11:42:02 -07:00
Dirk Hohndel
c33dd3808e Update translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-20 18:50:33 -07:00
Berthold Stoeger
f42dee8ac2 selection: when changing current dive make sure it is selected
When an undo command selected invisible dives, a current dive outside
of the list of selected dives was chosen. This could have the very
unfortunate effect that the current dive was set, though not selected.
From an UI point of view this meant that the dive was displayed, but
edits would not be registered.

Change the setClosestCurrentDive function to select the current dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-20 18:23:57 -07:00
Berthold Stoeger
43390d4a9a dive list: on reload update filter status
At some time, when introducing the global reset signal the filter
stopped being reloaded when loading a new log. This leads to very
strange UI behavior: dives disappear when editing fields unrelated
to the filter.

Therefore, when reloading the model, reset the filter. One might
argue whether this is the correct place. On the other hand, we
might even make the filter a sub-object of the dive-list model.
Let's think about this.

Partially solves #2961

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-20 18:21:56 -07:00
Dirk Hohndel
77781b936a build-system/packaging: add bluez dependency for Coverity build
I had missed this one in commit d73e0a0fb4
("build-system/packaging: add bluez dependency for Linux builds").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-20 18:17:20 -07:00
Dirk Hohndel
767f0a4f3e Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19 19:29:22 -07:00
Dirk Hohndel
d73e0a0fb4 build-system/packaging: add bluez dependency for Linux builds
I hope this captures all the variations

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19 19:26:56 -07:00
Dirk Hohndel
780cb4fce7 core/bluetooth: only Linux / Windows are supported by libdc rfcomm
For Android the Qt Bluetooth code seems to work just fine. And for macOS
nothing appears to work right now, but at least the Qt implementation compiles
and links.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19 19:26:56 -07:00
Linus Torvalds
e1befbea0a core/bluetooth: switch to use libdivecomputer rfcomm support
The Qt based implementation apparently got broken at some point and now fails
to connect to rfcomm dive computers like the Shearwater Petrel.

This uses the libdivecomputer rfcomm backend. Tested to work with bluez on
Linux as well as with the native Windows implementation.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19 19:26:26 -07:00
Dirk Hohndel
9e50ab87dc Update to current libdivecomputer
Merge Shearwater PNF fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19 15:25:48 -07:00
Miika Turkia
db6acfdd27 Update Shearwater sample time calculation
At least Shearwater Cloud seems to use multiple formats for sample time
recorded in the database. Sometimes the time is in seconds, sometimes in
milliseconds, and sometime it is something I have no idea about. Thus
switching to calculating the sample id myself and using sample interval
to calculate the actual sample time. Seems to be more reliable than
trying to guess what format Shearwater is using for this specific dive.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-19 11:20:27 -07:00
Berthold Stoeger
75be59c76d media: read timestamp from mvhd header of MP4/QuickTime videos
ExifTools (and probably other meta-data editors) modifies the
mvhd creation date, but leaves the individual creation dates
in the tracks unchanged. Therefore, use the mvhd atom.

Reported-by: Eric Tanguy <erictanguy2@orange.fr>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-19 11:11:16 -07:00
Dirk Hohndel
4998052a78 mobile: update version to 3.0.15
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-17 11:19:56 -07:00
Dirk Hohndel
9f90e89b3c Update to current libdivecomputer
This adds BLE transport as an option for the McLean Extreme.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-17 11:19:56 -07:00
Linus Torvalds
aa95a9a744 Extend BLE uuid matching to the characteristics, add ignore-list
This extends the uuid matching to the low-level characteristics too, so
that we can ignore the McLean Extreme characteristics that aren't
interesting.

It also renames the uuid matching to be about a "uuid_list" rather than
being about the service we're matching, since we're now using it for
other uuid's than just services.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-09-17 07:54:35 -07:00
Linus Torvalds
981c1cb1d3 Fix 'uud' typo in BLE uuid matching code
Silly typo with a missing 'i' in 'uuid' that happened when I wrote this
code originally, and that compiled fine thanks to the error being
duplicated with cut-and-paste to all relevant places.

Fix it now, since I'll extend the uuid matching to the actual
characteristics for the McLean Extreme.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-09-17 07:54:35 -07:00
Dirk Hohndel
e927c70b89 Update to current libdivecomputer
This merges the McLean Extreme sample interval fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-15 11:58:36 -07:00
Dirk Hohndel
ff14ca4dd5 translations: use the right Qt translations (part 2)
It turns out that contrary to what the documentation states, a few languages
are still only using the 'qt' translation. But those exist for all languages,
so we need to first search for the 'qtbase' translations, and only if that
fails do we try to load the 'qt' translations.

And even that will fail for languages in which Qt simply isn't localized (like
Dutch).

To make the code more readable, the check for 'US English' was moved earlier as
there is no point to look for a Qt translation for that (simply doesn't exist).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-15 11:54:36 -07:00
Dirk Hohndel
1ed8cb373f translations: use the right Qt translations and try harder to find them
We were still using the 'qt' translations instead of 'qtbase' as we should have
been using since forever - it's a little unclear from reading the documentation
when in the Qt5 life cycle this happened, but definitely several years ago.
These are the strings used in situations where Qt already provides us with text
(e.g., the entries in the 'Subsurface' menu on Mac, or the button labels in
many dialogs).

Additionally we didn't try hard enough to find those translations in cases
where they are bundled with the app; so basically all scenarios except for
Linux distro specific packages or 'build from source' on macOS or Linux were
not going to work, even after addressing the qt->qtbase conversion.

But of course the developers pretty much all fall into those last two
categories. Still, I cannot believe we never fixed this in all those years...

To make it more obvious if we still aren't finding the Qt translations this
commit also makes that warning be shown in all cases, not just when running in
verbose mode.

Fixes #2954

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-15 10:50:28 -07:00
Miika Turkia
c1226a008a Update ReleaseNotes
Mention Shearwater Cloud fixes and adjust capitalization / tags slightly.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-15 08:47:51 -07:00
Miika Turkia
a7bed157b5 Grab the first gas on Shearwater import
The logic to retrieve gas changes from Shearwater cloud database is
detecting only when the O2/He chnages. This change will grab the initial
gas. (Problem was only shown when there was a gas changee in the log, so
cingle cylinder dives were working fine.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
23efcef58a Fix a bug on Shearwater cloud gas changes
Gas change is done to the cylinder we just found and not the last
cylinder. Also switching the variable name to index as we are actually
using that value outside the loop.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
b5c00c89e6 Import cylinder pressure correctly
Shearwater apparently stores correct pressures nowadays, so getting rid
of a hack to import double pressures.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
dee2b510bb Ignore gas changes if we one line contains bogus O2
This will ignore the gas changes that would be caused by Shearwater
cloud saving rows with 0 values in them.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
b8b67f239b New field for timestamp in shearwater cloud DB
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
06e6bcecb7 Shearwater cloud import: ignore bogus rows
A sample log I received contains a lot of rows with 0 values in it. This
will ignore the obviously bogus ones. (However, we might miss the first
sample if that is recorded at time 0.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Miika Turkia
dbf7fa89a2 Shearwater cloud import: adjust to milliseconds
Seems that Shearwater cloud gives the sample time in milliseconds
nowadays. Taking a wild guess, that this logic should suffice for us to
be able to import old and newer XML logs. (Assuming that if the
timestamp for the first sample is more than 100, timestamps are in
milliseconds, otherwise in seconds.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-09-15 08:47:51 -07:00
Dirk Hohndel
601f49ab84 build-system/macOS: change signing to re-enable notarization
This continues to be useless for other people as it requires my signing key,
but when signed like this I can then successfully submit the dmg for
notarization, so I'll update the signing script in order not to lose that
magic...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 18:34:36 -07:00
Dirk Hohndel
da3b2c89f2 pull latest translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 15:27:53 -07:00
Dirk Hohndel
53ea3b4964 build-system/macOS: use consistent code to pick SDK
Hardcoding versions was kinda silly. This now matches what's in build.sh.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Dirk Hohndel
3825fbbf72 build-system/macOS: add one more library that macdeployqt misses
This appears to be new with Qt 5.14.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Dirk Hohndel
e6ac0665c7 build-system/macOS: build libz and libftdi as part of Mac dependencies
Usually people will install these via Homebrew, but when we need to build
everything ourselves (required for release binaries), then these two were
missing before.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Dirk Hohndel
605ce56ea2 build-system: add zlib as library we know how to fetch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Dirk Hohndel
efdff9fd87 desktop: fix TableView for Qt 5.15
If we set the size on the QPushButton, the button no longer receives any input
(tested on macOS). With this change we get an odd visual artifact when clicking
on the 'add' button, but it least it works, so this is good enough for the next
release.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13 13:55:46 -07:00
Berthold Stoeger
a01ab81713 cleanup: fold core/divecomputer.cpp into core/device.c
core/device.h was declaring a number of functions that were related
to divecomputers (dcs): creating a fake dc for manually entered dives
and registering / accessing dc nicknames. On could argue whether
these should be lumped together, but it is what it is.

However, part of that was implemented in C++/Qt code in a separate
core/divecomputer.cpp file. Some function therein where only
accessible to C++ and declared in core/divecomputer.h.

All in all, a big mess. Let's simply combine the files and
conditionally compile the C++-only functions depending on
the __cplusplus define.

Yes, that means turning device.c into device.cpp. A brave soul
might turn the C++/Qt code into C code if they whish later on.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-13 13:54:59 -07:00
Berthold Stoeger
fcdb48779b cleanup: remove unused declarations in class DiveComputerList
The functions matchDC() and matchModel() were never implemented.
Remove their declarations.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-13 13:54:59 -07:00
Berthold Stoeger
34286f328d cleanup: remove unused function DiveComputerNode::changesValues()
This was not used anywhere - let's remove it!

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-13 13:54:59 -07:00