summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.cpp
AgeCommit message (Collapse)Author
2015-09-02Enable the configuration of more OSTC settingsGravatar Anton Lundin
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-02Enable the configuration of more OSTC3 settingsGravatar Anton Lundin
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-02Remove getters and setters in DeviceDetailsGravatar Anton Lundin
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-05-27Wire gui for diagnostic logs from dc configurationGravatar Anton Lundin
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-02-10Remove the ProfileWidget from mainwindow.uiGravatar Tomaz Canabrava
It is now in mainwindo.cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-26Remove progress bar resetsGravatar Anton Lundin
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-26Remove confusing leftover commentGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21Add a QProgressDialog to auto-ostc3-firmwareGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21Connect the progress events to the progress barGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21Use a progressbar in the configure dc dialogGravatar Anton Lundin
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-17Clean up the header filesGravatar Dirk Hohndel
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-08Only suggest OSTC3 fw upgrade on newer versionGravatar Anton Lundin
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-08Remove stray debug printsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-05Remove unused importsGravatar Anton Lundin
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-04Fix spelling errorGravatar Joseph W. Joshua
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>
2014-12-29Add reminder for OSTC Sport to re-enable bluetoothGravatar Anton Lundin
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-28Whitespace cleanupGravatar Dirk Hohndel
Plus removal of a few qDebug() calls I introduced earlier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28Fix ConfigureDiveComputer classGravatar Dirk Hohndel
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-28Automatic OSTC firmware update: download file and try to installGravatar Dirk Hohndel
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-28OSTC firmware update prompt: use the stable changelog filesGravatar Dirk Hohndel
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-28Include QDebug header - otherwise a compile errorGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28Progress towards automatic OSTC firmware updatesGravatar Dirk Hohndel
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-27Move OSTC firmware check around a bitGravatar Dirk Hohndel
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-27Small whitespace fixGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-27Read current version from H&W web pageGravatar Robert C. Helling
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-22Enable firmware updates for OSTC3/OSTC SportGravatar Anton Lundin
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-08Emit the successful message the right wayGravatar Anton Lundin
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-10-27Create a delegate for depth and gas componentsGravatar Anton Lundin
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-27Create a delegate for gas type columnsGravatar Anton Lundin
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-27Change the salinity setting for OSTCGravatar Anton Lundin
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-27Change the OSTC3 copied ui to be sane for OSTCGravatar Anton Lundin
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-27Copy the configure OSTC3 ui to the OSTC UIGravatar Anton Lundin
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-20Configure support for OSTC, Mk.2/2N/2CGravatar Anton Lundin
First out is firmware updates. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Disable update firmware button for OSTC3 for nowGravatar Anton Lundin
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-18Add support to reset OSTC3 settings to defaultGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Wire up more settings in the OSTC3 settingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Save columnwith of Ostc3 settings tablesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Make ConfigureDiveComputerDialog ui a class memberGravatar Anton Lundin
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-16Enable/Disable Update Firmware button based on dcGravatar Anton Lundin
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-16Don't allow writing before we got dataGravatar Anton Lundin
Don't allow creation of backup files or writes to the computer before we know we got some data, either from a backup file or from the actual device. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-14Setup defaults for some of the OSTC3 settingsGravatar Dirk Hohndel
This is still missing lots of values which are now set to 0 with rather unfortunate consequences (for example, setting Saturation and Desaturation to 0 turns off the NDL / Deco calculations). So this code right now is quite broken. But at least this fixes the reported crash and gets some valid data initialized. Fixes #744 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Connect the Suunto Vyper Configuration uiGravatar Anton Lundin
This code connects up the configuration ui with the backing data structures thats gets read/written to/from the devices. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12This adds a ui for Suunto Vyper settingsGravatar Anton Lundin
This builds up a ui to use for all the settings for the Suunto Vyper family devices. Some of the fields are pure information, eg, max depth and number of dives, so they are marked read-only. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Actually set the setpoints to the OSTC3Gravatar Anton Lundin
The setpoints filled in into the ui where never set on the devicedetails object so they where never propagated to backup or write settings. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Futher capitalisation standardisationGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Show correct path after saving dive computer settingsGravatar Joseph W. Joshua
When backing up dive computer settings to XML, the confirmation dialog shows the default file path. This patch fixes that by displaying the correct file if the user changes the backup location. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-13Improve on error reporting in the ConfigureDiveComputer classGravatar Joseph W. Joshua
This patch improves on the error reporting for the dive computer configuration dialog to use config->lastError. The previous code was using a different argument in each function, which lacked uniformity. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Hide status message when an error message is presentGravatar Joseph W. Joshua
To avoid confusion, this code update makes the status text empty whenever there is an error message. This makes the error message more prominent. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Change Dive Computer Configuration dialogGravatar Joseph W. Joshua
Changes the layout of the ConfigureDiveComputer dialog to use a list of supported computers on the left, with a stacked widget showing the configurable details. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Start Work on Firmware UpdateGravatar Joseph W. Joshua
This patch implements the first step towards OSTC 3 firmware update. Its not much, just file selection, but I will build up on it from there. Implements a thread to initiate firmware updates. Currently, this is for the OSTC 3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>