Commit graph

79 commits

Author SHA1 Message Date
Dirk Hohndel
6b0d9adb61 Avoid potential uninitialized access
I don't think this could ever happen but hey, let's be sure.

Coverity CID 1307985

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-02 15:42:43 -04: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
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
Anton Lundin
94a86df9a3 Rename Suunto config field to be consistent
All the conflicting fields for suunto vyper configs are named _1, so
rename this one to be in the same style.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25 09:55:33 -07:00
Anton Lundin
5472036931 Connect up custom serial in dc configuration
This connects up the custom serial code in the configure dive computer
dialogs.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 14:02:32 -07:00
Anton Lundin
a42df06dbf Lift dis- and connect out from config operations
When working with ostc's via bluetooth, they will reboot and exit
bluetooth mode when you send the disconnect command. Thats kinda
inconvenient when you would like to read your settings, change something
and write it back, you need to start bluetooth mode on your device
twice.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-12 14:02:12 -07:00
Anton Lundin
c0c4b5c4b3 Configure divecomputers: add delegates for setpoint configuration
This adds delegates to simplify configuration of setpoint values in the
OSTC's.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:37:13 -07:00
Anton Lundin
444d0d6693 Configure divecomputers: access table data the same way as its set
The table data is set via role, so retrieve the data via role too.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:37:05 -07:00
Anton Lundin
e70b33a56b Configure divecomputers: fix spelling of First
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 15:36:54 -07:00
Anton Lundin
865c4aedee Save settings in closeEvent, not destructor
This switches to use the closeEvent to save settings and cleanup instead
of the destructor.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-10 09:40:04 -07:00
Anton Lundin
9212458f23 Enable the configuration of more OSTC settings
This enables enables you to configure a couple more settings in the
OSTC devices, roughly corresponding to the new ones that can be
configured in the OSTC3 devices.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:26 -07:00
Anton Lundin
37953d163e Enable the configuration of more OSTC3 settings
This enables enables you to configure a couple of new settings in the
OSTC3 devices.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:20 -07:00
Anton Lundin
c69d5619ce Remove getters and setters in DeviceDetails
The DeviceDetails class is just a storage container for passing values
back and forth between backend and ui code. The different names between
the setters and getters just made it a pain to write nice macros and
keeping the two ends in sync, so this just removes the setters and
getters in favor of having the members public.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:06 -07:00
Anton Lundin
b76a0f0b97 Wire gui for diagnostic logs from dc configuration
This copies peaces from the downloadfromdivecomputer dialog into the
configuredivecomputerdialog and connects them to be able to create a
logfile form the configuration of the divecomputer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-27 15:37:50 -07:00
Tomaz Canabrava
6b038c2a9a Remove the ProfileWidget from mainwindow.ui
It is now in mainwindo.cpp

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10 10:45:45 -08:00
Anton Lundin
7825495620 Remove progress bar resets
The reset call hides the progress bar text, and that way it hides our
error messages we try to show with the progress bar.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 14:58:34 -08:00
Anton Lundin
277d090f55 Remove confusing leftover comment
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26 14:58:23 -08:00
Anton Lundin
e8b02d3b2a Add a QProgressDialog to auto-ostc3-firmware
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21 17:04:52 +12:00
Anton Lundin
724170f4b6 Connect the progress events to the progress bar
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21 17:03:24 +12:00
Anton Lundin
ba525df766 Use a progressbar in the configure dc dialog
This switches from a couple of labels in the dialog to a progress bar,
to later being able to use it to provide better user experience.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21 17:03:18 +12:00
Dirk Hohndel
02d8dd5d13 Clean up the header files
Lots and lots and lots of header files were being included without being
needed. This attempts to clean some of that crud up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17 23:00:43 +13:00
Anton Lundin
8a5f2ef52f Only suggest OSTC3 fw upgrade on newer version
Previous code suggested a "upgrade" if your firmware where other than
whats parsed from the autofirmware call.

This switches that logic into only suggesting firmware upgrade if the
found firmware is newer than the firmware your device runs.

The previous logic was very annoying if you have a device running a
development version of the firmware. If you have taken that step of the
guided path, you shouldn't be told to "upgrade" to something older
every time you download from your computer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08 14:35:03 -08:00
Anton Lundin
4f8536c253 Remove stray debug prints
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-08 14:34:51 -08:00
Anton Lundin
ae6f5f0a5a Remove unused imports
These doesn't exits in Qt for android to...

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05 19:37:53 -08:00
Joseph W. Joshua
7f407095aa Fix spelling error
Fix small spelling error in configure dive computer dialog.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-04 17:51:52 -08:00
Anton Lundin
e00233051e Add reminder for OSTC Sport to re-enable bluetooth
The OSTC Sport exits bluetooth mode after the loogbook download. To
update the firmware in the OSTC Sport, we need it enabled again, so we
gently remind the user about doing that before continuing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-29 16:27:26 -08:00
Dirk Hohndel
b2f4896f3c Whitespace cleanup
Plus removal of a few qDebug() calls I introduced earlier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 21:02:28 -08:00
Dirk Hohndel
4559a26e31 Fix ConfigureDiveComputer class
This caused a crash when trying to call the firmware upgrade from the
downloader - no idea how this worked for the other caller (from the main
menu).

Anyway, with this the "offer to upgrade the OSTC after a download from an
OSTC that doesn't have the latest version" is indeed functional.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 20:46:44 -08:00
Dirk Hohndel
003f5d18b6 Automatic OSTC firmware update: download file and try to install
This successfully downloads the hex file.
The actuall update of the OSTC fails before it gets started with a crash
when the ConfigureDiveComputer object is created.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 10:22:46 -08:00
Dirk Hohndel
0be0cdb046 OSTC firmware update prompt: use the stable changelog files
Heinrichs Weikamp is giving us stable URLs from which we can get the
latest stable version. The parsing is a bit simplistic, but it seems to
work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 07:37:11 -08:00
Miika Turkia
6cf3355508 Include QDebug header - otherwise a compile error
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 06:41:44 -08:00
Dirk Hohndel
2461a731fc Progress towards automatic OSTC firmware updates
Better parsing of the website data, a simpe dialog that informs the user
that they should upgrade their firmware.

Still doen't call the right code path to DO the upgrade.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 06:39:30 -08:00
Dirk Hohndel
52084c80f7 Move OSTC firmware check around a bit
This rearranges the code so we can call it from the download dialog and
tell the user if there is a newer version of the firmware available.

This needs a proper dialog and needs to be hooked up so that the user can
accept the suggestion and go directly to the firmware update code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-27 08:31:51 -08:00
Dirk Hohndel
1c65b2f3c4 Small whitespace fix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-27 08:26:40 -08:00
Robert C. Helling
230ba7ace8 Read current version from H&W web page
This is only partial. It prints the current version string (to be
processed by a regex) via qDebug().

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-27 07:14:31 -08:00
Anton Lundin
44dd4df852 Enable firmware updates for OSTC3/OSTC Sport
This enables the dormant OSTC3/OSTC Sport firmware update code, now when
the hw_ostc3_device_fwupdate call is available in libdivecomputer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-22 14:28:59 -08:00
Anton Lundin
ac207ee5ff Emit the successful message the right way
The successful message was emitted in a some what older way then the
other messages so it was always emitted, even on error.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-08 08:38:50 -08:00
Anton Lundin
ee7c86f206 Create a delegate for depth and gas components
This creates a delegate to simplify the handling of gas components and
the change depth.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 15:41:55 -07:00
Anton Lundin
0e3a9328bc Create a delegate for gas type columns
This creates a delegate for the type column to choose the type value for
gases that is less confusing then the raw value.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 15:41:51 -07:00
Anton Lundin
29ee1896a4 Change the salinity setting for OSTC
On the OSTC's the salinity is in kg/l and is stored as kg/l * 100

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 14:40:51 -07:00
Anton Lundin
353868e6ec Change the OSTC3 copied ui to be sane for OSTC
The OSTC supports a bit different functionalities than the OSTC3 does.

The "unsupported" bits are
setBrightness
setCalibrationGas
setCompassGain
setDiveMode - Bult into setDecoType (OC/CCR)
setDiveModeColor - Lots of different colors
setFlipScreen
setLanguage - Controlled via flashing different firmwares
setPressureSensorOffset
setUnits
setSetPointFallback
setCcrMode - there are some ppO2 reading functionality in the fist gen
             OSTC that we don't care about, and the rest is controlled
             via choosing a CCR deco algorithm

Also the OSTC have a notion of number of dives it has done, so this adds
ui for that value.

There are also differences in how some values are handled. Ex the OSTC
don't have fixed samplerates that you can choose between. You can rather
just set your sample rate to X seconds.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 14:40:41 -07:00
Anton Lundin
eacf8fc623 Copy the configure OSTC3 ui to the OSTC UI
Just renumber the ui components. _3 for OSTC.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27 14:40:09 -07:00
Anton Lundin
856ec092b7 Configure support for OSTC, Mk.2/2N/2C
First out is firmware updates.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20 18:12:37 -07:00
Anton Lundin
1c2ddd62c1 Disable update firmware button for OSTC3 for now
We currently don't support update firmware for the OSTC3. Where waiting
for support in libdivecomputer for that, so disable that button for now.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20 18:11:48 -07:00
Anton Lundin
74f27a0a39 Add support to reset OSTC3 settings to default
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:22:22 -07:00
Anton Lundin
b2a66eab14 Wire up more settings in the OSTC3 settings
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:21:38 -07:00
Anton Lundin
882986dfdf Save columnwith of Ostc3 settings tables
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16 11:09:15 +02:00
Anton Lundin
5a394aaff6 Make ConfigureDiveComputerDialog ui a class member
Almost all of our other classes have the ui class as a class member in
the controller code. This switches ConfigureDiveComputerDialog to that
model.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16 11:08:18 +02:00
Anton Lundin
3785c76657 Enable/Disable Update Firmware button based on dc
Disable the Update Firmware button if you choose a device that we don't
support update firmware for.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16 11:07:00 +02:00