aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-10-20Style cleanupGravatar Anton Lundin
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-20Finish off the firmware update code.Gravatar Anton Lundin
This code connects the final parts of the generic firmware update code. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Fix spelling in configure dive computer tool tipsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Make it possible to have samples without depth from libdivecomputerGravatar Linus Torvalds
Normally, all samples have depths associated with them, and most dive computers likely don't even have the concept of a sample without a depth. However, the new Suunto EON Steel definitely has samples with just time updates (and perhaps other data, like events) and no depth at all. We get unhappy about that, and interpret it as having a zero depth. Which doesn't look very nice. This just makes all samples default to the same depth as the previous sample. For normal samples with a depth value, that will just override that default. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20HTML: Fix the Javascript library to support multi units.Gravatar Gehad elrobey
-make the dive profile dynamic to check user selected units from the settings file. -some of the code needs to be refactored and copied to a more appropriate location. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20HTML: Save data with user selected unitsGravatar Gehad elrobey
Edit the HTML exporter to export data fields with user selected units. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20HTML: Export unit preferences to settings fileGravatar Gehad elrobey
Working on HTML exports to support imperial and metric units and also custom selected units based on subsurface preferences. User selected units is exported to settings file that will be mainly used by listlib javascript file. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Recalculate the decompression if the date / time of a dive changesGravatar Dirk Hohndel
The pre-existing tissue load going into a dive can change if the start time of a dive changes. Therefore we need to recalculate the ceiling when editing start time (or date) of a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Correctly edit dive date/time when editing manually entered divesGravatar Dirk Hohndel
While the existing code worked fine for editing that start date or time of dives downloaded from a dive computer or imported from some other source, for manually entered dives this did not work and the date or time was always reset to the original time once the changes were saved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19TableView: fix button sizingGravatar Giuseppe Bilotta
Ensure that there is no (clipped) overflowfrom the header. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Fix tableview marginsGravatar Giuseppe Bilotta
The previous hard-coded solution for GTK+ didn't work on HiDPI, and a comment hinted that even on Mac OS X it might need tuning. Find a more generic solution that should work regardless of platform and style, based purely on the geometries reported by the style itself. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-independent trash iconGravatar Giuseppe Bilotta
Also, generate the corresponding pixmap only once, and distribute it to all models that need it. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-indepent dive picturesGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-independent DiveEventItem icon sizesGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Make planner work again for CCR divesGravatar Robert C. Helling
The latest CCR patches had rendered the planner not usable for CCR dives. This patch corrects this (and reenables the CCR set point column for segments). The problem was that a new member setpoint of struct divepoint had been introduced, but there was already po2 which had the same meaning. This patch merges the two and renames them setpoint to prevent future confusion. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Correct OSTC3 read/write of pressure sensor offsetGravatar Anton Lundin
The OSTC3 stores the pressure sensor offset as a signed 8-bit integer. 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-18Save the last OSTC3 settings to the backup fileGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Read/Write more settings from the OSTC3Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Simplify some OSTC3 Code with macrosGravatar 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-18Define settings ids for the new OSTC3 settingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Define new OSTC3 settings in devicedetailsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add a more settings to the OSTC3 settingsGravatar Anton Lundin
This adds the settings not previously available in the OSTC3 settings. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Create a Advanced settings page for OSTC3Gravatar Anton Lundin
This creates a Advanced settings page for the OSTC3 and moves the deco settings off to that page. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add GAS settings to the gas screenGravatar Anton Lundin
These settings are gas related so they fitted in the spare space in the gas screen. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Bugfix restore gas settings from xmlGravatar Anton Lundin
There was a typo, restoring gas2 over gas1. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Fix 02 typo, rename O2 members in devicesettingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add missing compass gain read from the OSTC3Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Fix plus icon position based on the themeGravatar Tomaz Canabrava
I hope this time I got it right. basically, the old code tried to guess where the plus icon should be with a fairly bad set of defauults. This one patch asks for the Qt style where everything is and uses that knowledge to make it be in a more sane position. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilota@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Unify icon metricsGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18actually use defaultIconSize()Gravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Define auxiliary functions for metricsGravatar Giuseppe Bilotta
Collect font, font metrics and icon size functions in a separate module. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Dynamic dive trip list column widthsGravatar Giuseppe Bilotta
Compute the default widths for the columns in the dive trip list from their header and (expected) content length rather than some fixed pixel sizes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Make TableView resolution independentGravatar Giuseppe Bilotta
Don't hard-code column widths or icon sizes/positions. Instead, compute them from the fonts used. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Dynamic ToolTipItem metricsGravatar Giuseppe Bilotta
Instead of hard-coding the icon sizes and spacing, compute them from the font sizes, that Qt auto-computes from the displya DPI. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Dynamic StarWidget metricsGravatar Giuseppe Bilotta
The default IMG_SIZE and SPACING in the StarWidget are not appropriate for HiDPI displays. Replace them with StarMetrics which are auto-computed from the (default) font size (which Qt determines from the display DPI settings). Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Fix the type of the for the Suunto max depthGravatar Anton Lundin
The type is now a double. It was a int during development, but due to the feet/128 precision i changed it to a Double, but the default value wasn't changed type on. All the Qt tools swallowed the number there without complaining but the Qt designer insisted on changing it to a double. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Fix column order for OSTC3 diluent tableGravatar Anton Lundin
The fist column is the O2% value, and was handled like that in the data. It was only the column header that was wrong. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Add a missing break after OSTC3 settings writeGravatar Anton Lundin
There was a missing break after writing the settings to the OSTC3. It caused us to fall down into the default case and saying that the operation was unsupported. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Set the diluent values from the right bufferGravatar Anton Lundin
The OSTC3 settings code read the data from the computer into spData, but set the data into the devicedetails object from dilData. 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-16Set limits for Saturation/Desaturation on OSTC3Gravatar Anton Lundin
The default max value for a QSpinBox is 99. The default Saturation factor for the OSTC3 is 110%. This code sets the max, min and default values on those spinboxes. The values comes from me reading the assembler code for the OSTC3. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-15Remove double includeGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-15255% as limit for Saturation/Desaturation on OSTC3Gravatar Anton Lundin
The default max value for a QSpinBox is 99. The default Saturation factor for the OSTC3 is 110%. This code raises the max values to 255 which is as far as i've read the ostc3_interface.odt the max value. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-15Read and write desaturation from OSTC3'sGravatar Anton Lundin
This adds missing code to read and write the desaturation factor to and from OSTC3's. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>