Commit graph

10164 commits

Author SHA1 Message Date
Tomaz Canabrava
6979ebfdae Make dive trip location edit work again.
:D

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 18:01:34 -04:00
Tomaz Canabrava
d25e456fcc Hide trip location when launching Subsurface
It was ugly to show trip and dive location when no dive
was selected.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 18:01:22 -04:00
Tomaz Canabrava
3548d11195 Update the dive site location when editing
Simple.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 18:01:15 -04:00
Tomaz Canabrava
db97f33e13 Add a new QLineEdit to set the dive trip location
This is different from a dive site, as it's not a dive site. It's just a
normal string, while a dive site has gps coordinates.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 17:59:44 -04:00
Tomaz Canabrava
d032373caf Fix selecting invalid dive site
This patch fixes an invalid dive site selection when
you where typing the name of a dive site for your current
dive.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 17:59:35 -04:00
Dirk Hohndel
f1558b86da Another small string update for translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 12:56:35 -04:00
Lubomir I. Ivanov
6614e38581 printoptions.cpp: add missing tr() calls
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 12:55:29 -04:00
Miika Turkia
261c11de28 Test case: fix Seabear test data to proper dive length
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 07:56:21 -04:00
Miika Turkia
058575bbbc CSV import: use the delta value instead of 1 sec
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 07:54:51 -04:00
Dirk Hohndel
efa4dc3c9a Don't zoom out the globe if the dive site has no GPS
This may or may not look intuitive, but it can cause problems with the
zoom seemingly stuck all out (because of the timeouts). So instead stay
where you are. If the current dive site has GPS then its flag will be
bigger and brighter - so there still is visual feedback. But there's less
crazy zooming around.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 07:52:13 -04:00
Dirk Hohndel
a52f8f8168 Latest strings
And the usual clutter of thousands of line location changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01 07:38:26 -04:00
Tomaz Canabrava
cbf02ac7ab Fix multi-dive edit regarding Dive Sites
Now it correctly sets the same dive site instead of
creating a new one for each dive.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 19:28:55 -04:00
Tomaz Canabrava
63a2307cfb Better way to handle the tooltip for dive sites
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 19:26:46 -04:00
Tomaz Canabrava
0847447cda Make 'Choose dive site' work as 'Rename'
But it will actually create a new dive site, not just rename the existing
one.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 19:24:38 -04:00
Tomaz Canabrava
2794af4166 Remove unused code
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 19:24:27 -04:00
Dirk Hohndel
83b14629d8 Don't emit the filter end signal too soon
First make sure all the data in displayed dive is correctly recorded,
otherwise things could get overwritten when the filter is removed and we
redisplay the current dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 19:11:16 -04:00
Dirk Hohndel
ebc3b148db Don't merge manually added dives
If the user added a dive manually we have a hard time trusting the start
time and duration. We just shouldn't automatically merge them with
anything else.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30 07:47:20 -04:00
Dirk Hohndel
aedbde1e86 Delete unused dive sites after edit
This way they don't continue to clutter the globe.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 20:58:57 -04:00
Dirk Hohndel
1b8ac21f6b Correctly handle updating the name of dive sites from GPS
If the user downloaded the GPS data from the Subsurface webservice before
naming a dive site, we run into a special case where entering a new name
for a dive location should just update the name of the automatically named
site which already has the correct GPS information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 20:10:29 -04:00
Dirk Hohndel
b1a929260f Whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 19:57:53 -04:00
Anton Lundin
57e83240dd qtserialbluetooth: use QIODevice::Unbuffered io
This adds the QIODevice::Unbuffered flag to our rfcomm connections to
bypass the buffering layer in QIODevice.

This fixes so firmware upgrades work against the OSTC Sport.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 17:46:19 -04:00
Anton Lundin
65e9991501 qtserialbluetooth: Remove no-op calls
waitForReadyRead and waitForBytesWritten not overridden in
QBluetoothSocket and the default implementation in QIODevice are just
no-ops that always return false.

This removes those calls to lessen the confusion for anyone who looks at
the code.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 17:46:08 -04:00
Dirk Hohndel
edac07554c Make sure we don't create multiple dive sites with the same uuid
This shouldn't happen, but in case there is a logic error higher up in the
code somewhere, this will prevent it from happening, period.

If the code asks for a new dive site with a specific uuid, simply return
the existing dive site with that uuid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29 12:58:16 -04:00
Dirk Hohndel
7ad1485c39 Don't save unused, auto-create dive sites
Normally the auto-created sites that are used when downloading GPS data
from the webservice that aren't associated with a dive will immediately
discarded. But if such a site is used for a dive but then the user changes
their mind and uses another site for that dive (for example because they
had a previous dive at that spot and decided they liked that one better
after all), then the dive site can stick around as an orphan.

Having orphan dive site may make sense for named dive sites that for some
reason are no longer used but may be used again in the future, but having
an auto-named orphaned dive site in the data file seems silly. So let's
remove them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 22:30:20 -04:00
Dirk Hohndel
55cc0ee9c1 Fix incorrect and confusing warning message
In verbose mode we wanted to tell the user if they had a reference to a
non-existant dive site that we removed for consistency. Except the
condition was wrong and the warning was printed for every VALID dive site
reference. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 21:41:32 -04:00
Dirk Hohndel
b992ca22df Make importing of GPS locations less verbose
These messages are extremely useful to understand what Subsurface is
doing, but they are a bit too wordy for normal use.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 13:11:44 -04:00
Dirk Hohndel
dc7f6bcfc9 Cloud storage: show progress bar when using Save with cloud storage open
When you have openend cloud storage, the Save and Save to cloud storage
are basically the same thing... so we need to show the progress bar in
that case, too.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 13:05:20 -04:00
Dirk Hohndel
332cc0a418 Cmake: make libssh2 library path explicit
Under certain conditions on my Mac the build process will happily find libssh2
but then at link time can't figure out where it is. Making the path to the
library explicit seems to fix that issue.

This commit also adds the code to dump all visible variables at the end of the
cmake file (commented out). I have looked this up online, added it to address
an issue, and then removed it quite a few times... I figure I might as well
keep it there for the next time I need it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 07:46:44 -04:00
Dirk Hohndel
8b4d502f24 Make progress dialog show up more reliably
Counterintuitively, setting the minimum duration to 200ms actually makes
the dialog show up while waiting for the first progress signal. I had
thought that setting it to 0 would make it show up right away, but with a
value of 0 it waits for the first progress notification and with slow
internet connections that can take quite a while (and with some git
operations no progress notification will be sent out the whole time).

So this should make the situation with the progress bar a little better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28 06:54:55 -04:00
Linus Torvalds
2c0123c677 Don't use surface sample data for cylinder beginning/end
pressure

At the beginning of the dive, let the cylinder cool down if the diver
starts off at the surface.  And at the end of the dive, there may be
surface pressures where the diver has already turned off the air supply
(especially for computers like the Uemis Zurich that end up saving quite
a bit of samples after the dive has ended).

So just don't use surface samples to populate the beginning/ending
cylinder pressure data.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 22:53:43 -04:00
Dirk Hohndel
cbf29653d7 Don't crash when creating a dive site ID for a nameless site
This can happen when parsing the GPS data from our web service.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 13:16:40 -04:00
Rick Walsh
fe9958380e TestPlan: Set VPM-B conservatism to zero
The VPM-B benchmark results are all based on nominal/zero conservatism, so we
should make sure we use zero conservatism in the tests.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 12:53:46 -04:00
Rick Walsh
3741e8228e VPM-B set default conservatism +3
Nominal (aka 0) conservatism for VPM-B is generally considered aggressive.  We
don't want to be aggressive, especially as some users might assume the default
is the correct value.  Our default Buhlmann gradient factors are 30/75.  The
most similar VPM-B conservatism level is probably +3, at least for dives in the
40-50 metre, 50-70 minute range.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 12:53:25 -04:00
Tomaz Canabrava
64453893a0 Do not set text on the Location LineEdit
Since the location is only true with a valid uuid, set the
uuid on it, it will search for a valid name and set there.
this fixes a few inconsistencies handling  the locations.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:18 -04:00
Tomaz Canabrava
94d05d1cb6 Do not try to center if already on center
This makes the globe smoother while moving around same gps
dive sites.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:18 -04:00
Tomaz Canabrava
1239056fb6 Center on the dive site also via keyboard
Now mouse and keyboard navigation over the list of current
dive sites will update the marble globe position.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:18 -04:00
Tomaz Canabrava
6633ab302d Change globe position when mouse over dive site
When the mouse moves over the dive site list, the globe
should show the current one under the mouse.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:18 -04:00
Tomaz Canabrava
a5d2003e3a Only get the icon for add/geocode once
Each time we searched for an icon on the qt resource
we had to open, inflate, create, store, delete the icon.
now we search for it only once, use as cache and make
the world a better place.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:18 -04:00
Guido Lerch
fc420927ff Uemis downloader: display message if no dives to download
Display an error message if no new dives are there for download.

[Dirk Hohndel: small adjustment to the message]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:43:17 -04:00
Salvador Cuñat
f5a205d3db Update spanish translation of user manual to english 8462ae2
Bluetooth

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:11:22 -04:00
Willem Ferguson
b74809b62d user manual: Bluetooth douwnload
Clean up the text on the above issue. Many thanks, Claudiu.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27 06:11:05 -04:00
Dirk Hohndel
8e76456149 Cloud storage: try to work around weird Windows rename issue
In some cases the rename of the cache directory would fail in my testing.
Based on code that Lubomir provided, this tries a Windows specific
implementation of folder rename if the QDir based one fails for some
reason - but obviously only if we are running on Windows.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-26 12:35:21 -04:00
Dirk Hohndel
b1dca1176f Cloud storage: use QDir instead of QFile for renaming directories
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-26 12:34:38 -04:00
Dirk Hohndel
aa76f74f97 Cloud storage: delete http.proxy key if no proxy is set
Apparently Windows doesn't like it if the proxy string is set to the empty
string.

Also give some better debugging output when run in verbose mode.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-26 12:28:47 -04:00
Dirk Hohndel
c4eb9571be Cloud storage: inform the user if remote sync failed
Being silent in this particular case was the wrong decision as it hides
problems.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 10:45:39 -07:00
Claudiu Olteanu
8462ae27b2 User manual update: Bluetooth section
Update the user manual with information about the new Bluetooth
download mode feature.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:57:11 -07:00
Anton Lundin
07b4bdd1b3 Reset progressbar on disconnect
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:56:58 -07:00
Anton Lundin
117de891c7 Disable update firmware button on any other action
Firmware updates can only be done on a newly opened device.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:56:51 -07:00
Anton Lundin
f5176d908d Skip OSTC3 configs which the sport doesn't handle
Use model name to skip some configs which the Sport doesn't handle and
starts misbehaving on.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:56:43 -07:00
Anton Lundin
8946c82242 Probe and expose OSTC3 model information
This looks at the OSTC3 hw descriptor and exposes that model info as a
read-only line edit, so you can see in clear text the name of the model
of computer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:56:11 -07:00