Commit graph

183 commits

Author SHA1 Message Date
jan Iversen
9ffc8dd2ea release doc: update CHANGELOG.md
add info about qml compiler

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 03:52:40 +09:00
jan Iversen
11592ed958 release doc: add to CHANGELOG.md
Upload to dive-share is now available in mobile

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 21:35:55 -05:00
jan Iversen
4710502dc8 release doc: add to CHANGELOG.md
Upload to divelogs.de now possible with limited error/success reporting.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
Dirk Hohndel
84394adb11 AppImage: don't bundle our libdbus
This appears to prevent Bluetooth from working.

Fixes: #2370

Suggested-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-07 10:21:05 -08:00
jan Iversen
f0c61be711 release doc: add to CHANGELOG.md
Export is now limited available in Subsurface-mobile

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
Robert C. Helling
33e49637ec Add current GF to infobox
As per request from users on scubaforum.com, this adds
the current gradient factor to the deco information of
the infobox. Up to now, this information was only
graphically represented in the pressure bar graph
and the heatmap. This gives a numerical value.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-28 12:23:04 -08:00
Berthold Stoeger
4928c4ae04 Desktop: Improve speed of selecting multiple (or all) dives
When selecting all dives via CTRL-A or manually and the trips
were not expanded, the QSelectionModel sends a single
selectionChanged signal per trip. We are reloading the map
in every call, making this very slow.

I couldn't figure out how to make QSelectionModel behave more
nicely, therefore I chose the nuclear option: Remove the map
reloading from selectionChanged() and hook into all functions
that do selection changes. In these functions, first call the
original code and then do the selection-changed operations.

This will certainly need some tuning.

Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-28 12:15:24 -08:00
jan Iversen
4372487e40 release doc: add feature to CHANGELOG.md
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26 09:44:13 -08:00
Dirk Hohndel
c36513a9f3 Core: don't prevent some OSTC models from being recognized
The code seemed to do something really reasonable by picking one of the
supported OSTC versions - except that the one it picked didn't support
BT/BLE and therefore our logic of recognizing dive computers on iOS
failed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-22 16:53:29 -08:00
Berthold Stoeger
e66f2aed6a CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-19 06:35:59 -08:00
Dirk Hohndel
dc95b077d9 Mobile: Add CHANGELOG and user manual update
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-10 21:59:32 +01:00
Berthold Stoeger
eaf8a59edf CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-09 19:19:04 +01:00
Dirk Hohndel
ccace53b83 Mobile: remember if we were able to open the local cache
If there is a local cache, we at least once successfully accessed the cloud, so
this is a valid cloud based git tree.

Without this change we run into a subtle bug: after a fresh install, or when
switching users, when the cloud data is accessed the very first time, we don't
remember that this was indeed loaded from the cloud. So if we then download
from a dive computer or make any other changes to the dive log, we cannot save
those dives to cloud storage - but we fail silently doing so. Which to the user
would look that inexplicable data loss.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Robert C. Helling
a3a3913e1e Planner: Don't accumulate rounding errors in stop durations
When displaying segment or stop times in the planner notes, we always
round to the next full minute. This can mean for example that we
round down more often than rounding up with the result that the sum
of the segment times does not match the total runtime and can for example
lead to stops that are shown with 0min duration.

With this patch, we increase the reference time of the last display only
by the duration time actually shown. This way, the rounding errors don't
accumulate but having rounded down previously makes rounding up the next
time more propable.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-11-03 04:05:29 -08:00
Robert C. Helling
9c8fbe494d Planner: Add option to treat O2 as narcotic
When computing the best mix for a target depth, for helium, one
can either require that the partial pressure of N2 is the same
as at the target depth or the partial pressure of N2 plus O2.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-10-31 00:30:38 -07:00
Berthold Stoeger
81ea47a498 Desktop: fix dive site editing
When clicking "done" on the dive site edit screen, the diveSite
member variable was reset to nullptr in acceptChanges() at the
beginning of the function. This prevented posting an undo-command
as a consequence of the active widget losing focus.

Reset the diveSite variable after exiting dive-site mode, which
causes the active widget to lose focus.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-10-28 04:40:26 -07:00
Dirk Hohndel
d401271dab Mobile: make the GPS service icon work again
I don't recall when this stopped working.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-27 12:42:38 -07:00
Berthold Stoeger
c479c5ca36 Desktop: use undo command when replanning dive
Instead of copying the displayed dive, generate an undo command.
This makes the replanning an undoable action and fixes a bug
where the dive details have not been updated correctly.

Fixes #2280

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-10-26 11:36:23 -07:00
Dirk Hohndel
96386fbcc1 Update libdivecomputer
- Add support for the Oceanic Geo 4.0
- clean up Shearwater tank pressure handling
- minor fixlets

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-24 06:33:07 -04:00
Dirk Hohndel
e6298f9352 Mobile: allow editing dive number
No checks regarding duplicate numbers - we trust the user knows what
they are doing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-21 15:50:41 -04:00
Berthold Stoeger
4f0582ea0b Export: special case dive site mode when exporting dive sites
In dive site mode, export selected dive sites, not dive sites
of selected dives.

Fixes #2275.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-09-21 16:07:24 -07:00
Dirk Hohndel
cd19433290 Update CHANGELOG
Forgot to clear this out for the 4.9.3 release; update for the last
couple of changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-11 21:50:41 +01:00
Berthold Stoeger
e3cd0891d3 Dive site: close dive site edit widget when dive site is deleted
The application could be crashed by
1) Create dive site
2) Edit dive site
3) Undo until dive site is removed
4) Continue editing now non-existing dive site

Therefore, hook into the dive-site-deleted signal and if the
currently edited dive site is deleted, close the widget.

When closing the widget, make sure that the potentially
dangling pointer is reset to zero so that there is no
other potential use-after-free bug.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-09-07 08:28:29 -07:00
Berthold Stoeger
4dd86cc205 CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-09-06 11:48:47 -07:00
Berthold Stoeger
009f47c5dc Desktop: improve recognition of HTML-notes
To recognize HTML-notes the text was scanned for <div> tags. But
apparently the planner notes do not feature such a thing. Therefore
extend recognition of HTML to <table> tags.

Note we can't use the <html> or <span> tags, because these are
*always* produced by the QTextEdit::toHtml() function.

Fixes #2265

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-08-30 09:31:50 -07:00
Berthold Stoeger
25b30da244 Profile: properly initialize plot_info structures
The create_plot_info_new() function releases old plot data. This
can only work if the plot_info structure was initialized previously.
The ProfileWidget2 did that by a memset, but other parts of the code
did not.

Therefore, introduce a init_plot_info() function and call that when
generating a plot_info struct. Constructors would make this so much
easier - but since this is called from C, we can't use them.

Fixes #2251

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-08-28 07:10:09 -07:00
Dirk Hohndel
96f71e6cb1 Update README and ReleaseNotes for 4.9.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-08-24 15:04:54 -07:00
Berthold Stoeger
6cb0de4060 CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-08-24 14:00:06 -07:00
Dirk Hohndel
c43e5f648c Add CHANGELOG entry for mobile weight editing
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-08-11 12:23:57 -07:00
Doug Junkins
624ab3bf9e Add missing header files to macos.c
Missing header files were causing errors opening cloud storage on
launch on Mac OSX.

Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-08-11 08:20:38 +02:00
Berthold Stoeger
344c85f499 Desktop: display trip time on main-tab
On the main tab, the trip time was not shown when switching to
a trip. Implement showing of the trip date in a function, as the
undo-code will also have to update the trip date in certain
circumstances.

Fixes #2207

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-08-08 09:03:33 -07:00
Dirk Hohndel
6e4c3ce6d8 Prepare for 4.9.1 release
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-08-01 13:29:38 -07:00
Dirk Hohndel
29f5d15a66 Desktop: correct tooltip for filter close button
This button only closes the filter panel but doesn't clear it.

Reported-by: Adric Norris <landstander668@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-29 07:24:05 +02:00
Berthold Stoeger
b0f1b25806 Crash fix: prevent crash in MapLocationModel::reload
Commit 0c38754916 introduced a
bug in MapLocationModel::reload() by setting an entry in the
name-to-location map before the location was initialized.

Move the setting of the map entry back where it was before:
after the assignment of the location variable.

Moreover, define the location variable directly on allocation
of the location to avoid thus bugs in the future.

Why did we not get a "might be used unitialized" warning
anyway?

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-27 14:57:31 -07:00
Dirk Hohndel
4d1df920a9 Prepare for 4.9 release
Update supported dive computers, README and ReleaseNotes

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13 20:39:18 -07:00
Berthold Stoeger
efe9bcce02 Profile: stop animations on export
The plotDive() function had a flag to plot pictures asynchronously.
This was used on export. Rename this field to "instant" and disable
animations when set. This should make sure that the axes are properly
exported.

Fixes #2170

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-12 09:59:28 +02:00
Michał Sawicz
17b059fcd6 [snap] add removable-media plug
This optionally allows accessing data in /media/ folders, if the user
issues:

snap connect subsurface:removable-media

https://docs.snapcraft.io/removable-media-interface

Signed-off-by: Michał Sawicz <michal@sawicz.net>
2019-06-05 11:09:59 +02:00
Berthold Stoeger
f6ab84f13f CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-20 21:23:16 -07:00
Berthold Stoeger
114b3d9d47 Core: consider dive-number on sorting
A user reports a problem when dives have the same time but different
numbers. The dives appear sorted randomly (effectively they are sorted
by an internal unique-id).

Try to sort by number for dives at the same date in this case.

Fixes #2086

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-05-12 12:28:06 -07:00
Miika Turkia
ad4c8ca5fc Changelog update
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2019-05-10 10:40:35 +02:00
Doug Junkins
98b3a326bd Add "Import dive sites" menu to mainwindow
Adds "Import->Import dive sites" menu to mainwindow.cpp and adds the
on_actionImportDiveSites_triggered() method to prompt for the filename
to import from. The files are parsed and then any dive and trip data is
cleared before opening a dialog box to select which sites are to be
imported.

Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-05-06 10:48:44 +02:00
Doug Junkins
14a763a6a0 Bugfix for algorithm in get_distance()
Fixed bug in the Haversine function in get_distance() based on algorithm
at https://www.movable-type.co.uk/scripts/latlong.html and added bounds
to the 'a' term to avoid floating point errors for antipodal points.

Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-04-30 23:32:50 +02:00
Robert C. Helling
52105e5217 Write dive data as video subtitles
This commit adds an entry to the dive media context
menu which offers to write a subtitle file. This
creates an .ass file for the selected videos.

In an attempt to to clutter the screen too much, don't
show irrelevant entries (zero temperature or
NDL and show TTS only for dives with stops).

VLC is able to show these subtitles directly, they
can be integrated into the video file with ffmpeg.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-04-16 20:38:19 +02:00
Dirk Hohndel
5966a74ae3 Update CHANGELOG
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-04-13 08:54:57 -07:00
Doug Junkins
27927f74a1 Add export option to export dive sites.
Selecting "Selected dives" exports the dive sites for the selected
dives. Selecting "All dives" exports all dive sites.

XML format is the subsection of the divelog XML that describes the
sites headed with a <divesites> section like:

  <divesites program='subsurface' version='3'>
  </divesites>

Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-04-13 08:18:32 -07:00
Berthold Stoeger
3184830f51 CHANGELOG.md update
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-04-04 09:38:20 -07:00
Robert C. Helling
8c9e5becb2 Export profile data
This introduces a csv file that contains the data from
the structs defined in profile.c, in particular all
deco information computed for the dive profle (including
NDL, TTS, ceilings, surface GFs etc).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-04-04 09:33:56 -07:00
Miika Turkia
d45f67c84d Update changelog
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2019-04-02 07:47:11 -07:00
Robert C. Helling
67a1981fbd Mention Surface Segment in Changelog
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-03-29 06:51:12 -07:00
Doug Junkins
bc9a62c0ff Update CHANGELOG.md to show depth and temp stats feature
Signed-off-by: Doug Junkins <junkins@foghead.com>
2019-03-14 21:41:58 +01:00