aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-10-22Set dctype of dives with pO2 setpoint information to CCR.Gravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Check return value after firmware updatesGravatar Anton Lundin
This reports back a error to the user if the firmware update failed. We should re-wire this to have a log-function that gets called from libdivecomputer via the context to get an actual error message. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Dereference the right pointer in fw update slotGravatar Anton Lundin
This fixes a copy-paste error, dereferencing the wrong pointer in the slot that gets called when the firmware update thread has run. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Fix compability with libdivecomputer < 0.5.0Gravatar Anton Lundin
hw_ostc_device_fwupdate was introduced after 0.4.2 so ifdef it to libdivecomputer >= 0.5.0. The scope of users interested in this feature probably isn't big enough to justify a bump of our dependencies to a unreleased version of libdivecomputer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Correctly place the first gas label in drop to bottom modeGravatar Dirk Hohndel
When dropping to the bottom in plan (and add) mode, the gas label was placed along the diagonal line from (0,0) to the second dive data point (i.e. the one at the end of the "at deptch" segment). That looks terrible, the label needs to be along the segment that we are spending at the bottom. This patch fixes that problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Fix dc nickname helper functionGravatar Linus Torvalds
This helper function is used to get a nickname for a dive computer, when the model information on its own may be ambiguous (ie there may be multiple dive computers of the same model, and we've nicknamed them by owner). However, the helper did completely the wrong thing if it didn't find a dive computer entry at all due to a missing device ID - it would just return empty. Which is bogus: it should return the model name, the same way it does if the nickname is missing. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> 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-20Add a icon for the Suunto Vyper Family config pageGravatar Anton Lundin
This adds a icon to the Vyper config page. The image is taken by me of my Suunto Vyper. Thats the reason for the quality. Question: Would it be ok to grab a PR image from Suunto's web page to use here? If so they got better ones... Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>