Commit graph

16 commits

Author SHA1 Message Date
Jan Mulder
dc9cf7bcbc OSTC3 incorrect notice to upgrade firmware
See https://github.com/Subsurface-divelog/subsurface/issues/342. The reason is
that we never get a DC_EVENT_DEVINFO when doing a memory dump. Just do not
offer to update firmware when we are creating a libdc dump.

Full credits of this fix go to Anton.

Fixed-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-25 10:39:33 -07:00
Stefan Fuchs
45dd564ee6 Translate string "cancel download" in DC download widget...
and change string "Retry" to "Retry download".

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-23 08:08:10 -07:00
Dirk Hohndel
d82e200d35 Download from divecomputer: reset progress bar fraction
Otherwise when retrying, the progress bar might already be reset, but
its text might still show 100%.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:55:46 -07:00
Dirk Hohndel
82d37e7451 Download from divecomputer: don't show bogus progress text
On some divecomputers we download all the data from the device and
then parse the data afterwards just in memory (at which point the
progress bar has already run all the way to 100%). So don't try to
show the dive number and time in that case.

Fixes #335

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:49:07 -07:00
Dirk Hohndel
0bd02bf1f0 Download from divecomputer: stop timer on error
If we run into an error during the download, stop the timer that
triggers the update to the progressbar.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22 13:46:27 -07:00
Stefan Fuchs
02e768a61b After DC import don't do RemoveRows if there is nothing to remove
This fixes an issue where beginRemoveRows is called with argument -1
in DiveImportedModel::setImportedDivesIndexes.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-21 11:26:49 -07:00
Jeremie Guichard
597539ce39 Fix double to int truncation in C++ code
Wfloat-conversion enabled for C++ part of the code
Fix warnings raised by the flag using lrint

Original issue reported on the mailing list:
The ascent/descent rates are sometimes not what is expected.
E.g. setting the ascent rate to 10m/min results in an actual
ascent rate of 9m/min.
This is due to truncating the ascent rate preference,
then effectively rounding up the time to reach each stop to 2s intervals.
The result being that setting the ascent rate to 10m/min
results in 20s to ascend 3m (9m/min), when it should be exactly 18s.

Reported-by: John Smith <noseygit@hotmail.com>
Reported-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-24 09:39:25 -07:00
Martin Měřinský
59d18a00db divecomputer > dive computer 2017-03-04 12:08:17 -08:00
Anton Lundin
4714f50eae Notify Ostc 4 users about new firmwares
This adds support for notifying Ostc 4 users about new firmwares when
they download dives from their computers, gives them the option to
trigger the upgrade flow.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Anton Lundin
a5232a30b0 Document potential bug source
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Anton Lundin
edce764686 Check for firmware updates on new devices to
The list of OSTC devices have grown, and this updates our lists of for
which devices we should check for firmware updates.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Anton Lundin
f9cd09b000 Workaround abuse of the now missing DC_TRANSPORT_BLUETOOTH
The DC_TRANSPORT_BLUETOOTH is quite abused here, and I removed it in our
custom serial code. This works around the issue so subsurface still
compiles.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-18 07:11:34 -07:00
Tomaz Canabrava
db8e8957ab Settings update: Add "Dive Computer" settings to SettingsObjectWrapper
For some reason, the dive computer settings weren't in the
settings prefs. This moves it, makes the boilerplate on Settings
ObjectWrapper and make things compile.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27 11:40:44 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Dirk Hohndel
8d19a6ae16 Silence warnings in downloadfromdivecomputer.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:26 -08:00
Tomaz Canabrava
e49d6213ad Move qt-ui to desktop-widgets
Since we have now destkop and mobile versions, 'qt-ui' was a very
poor name choice for a folder that contains only destkop-enabled
widgets.

Also, move the graphicsview-common.h/cpp to subsurface-core because
it doesn't depend on qgraphicsview, it merely implements all the
colors that we use throughout Subsurface, and we will use colors on both
desktop and mobile versions

Same thing applies for metrics.h/cpp

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30 10:36:49 -07:00
Renamed from qt-ui/downloadfromdivecomputer.cpp (Browse further)