summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-24Avoid overprinting of cylinder presssure labels for CCR divesGravatar willem ferguson
This patch takes the cylinder pressures of CCR dives and prints them in a non-overlapping way. Remaining issue: When the dive profile is made taller by dragging the window or the appropriate slider far down the screen, the labels move further apart; similarly, when the profle is made flat/shallow by dragging the window edge or appropriate slider up, the labels get close to each other and start to overlap. There are quite a few lines of additional code going into the patch. This is primarily because separate provisions for when po2 > p(diluent) or vice versa. In addition, I could not determine the size of the text characters which would allow much more precise placement of text. This is because the .scale member of the text is private and not available in the methods involved in printing the labels. However, the height of the vertical scale of the cylinder pressure graph can be determined [e.g. vAxis->maximum()]. This helped a lot to get the positioning of the text more or less correct. While the results of the patch is not perfect, It contributes significantly to make the profiles of Poseidon dives more readable. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24api change in libgit2-0.22Gravatar Martin Gysel
Yet another api change in libgit2... let's quote the website "libgit2 is ... linkable library with a solid API ..." Signed-off-by: Martin Gysel <me@bearsh.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Known import fix for XP5Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Fix segm fault on known CSV importsGravatar Miika Turkia
If the header line is not set up properly, the known imports assignments will index out of the array. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Different log record types added for DLF importGravatar Miika Turkia
The events we decode from DLF file are divided between log record types (1 through 5). Thus we need to parse the events from all of these record types. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Add missing DLF eventsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Correcly look at all relevant dive computer structuresGravatar Dirk Hohndel
When calculating maxima for a dive, we need to take data from all existing dive computer structures plus potentially also a fake dive computer structure that is just passed in in order to create a meaningful profile. Commit 86c961614bfa ("Actually walk all dive computers, don't just claim to do so") missed that second case and no longer took the fake_dc into account, breaking the display of dives that don't have samples. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-24Don't show previous dive computer textGravatar Dirk Hohndel
There were situations when the last text was still shown. E.g. when the current file was closed and then a new dive was imported from CSV. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Code cleanup: CCR setpoint and o2 sensor visualisationGravatar willem ferguson
This patch does some cleaning up of the code that provides visualisation of CCR o2 sensor and o2 setpoint data. It reduces the number of conditional evalauations that are required and it improves the readability of these parts of the code. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Fix quoted CSV importGravatar Miika Turkia
I am a bit baffled as to how this used to work before and does not work anymore. Anyway, it should be sufficient that we take the quoted text without verifying that the next character is the field separator. (Of course it would be better to make sure field separator follows, as then quotation marks could be used in the free-form texts.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Have Sensus samples inside divecomputer tagGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Set the known import selection for Seabear importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-23Use proper sample headings for Seabear CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Use correct case for string matching on CSV importGravatar Miika Turkia
As the string was changed in our CSVApps array, we must change it here as well. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Improve testing whether we have temp and depth infoGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Fix string that is used as XML tag nameGravatar Miika Turkia
We use the human readable name here as XML tag name so it cannot contain spaces. Note that currently some of the names can have spaces in them as they are special cases and not used as XML tag name. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Fix order of CSV field separatorsGravatar Miika Turkia
Unfortunately we are referencing these separators with index, so they need to be on same order as used in XSLT files. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Special handling of Seaber CSV filesGravatar Miika Turkia
These files contain a bit of extra data before the actual CSV part, so we need to skip there to show sensible information to users. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22When importing dives from CSV, mark them accordinglyGravatar Dirk Hohndel
The dive computer model string should indicate that these were imported from CSV. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Use correct flag when connecting 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-22DLF import: set no_o2sensors in CCR/PSCR modeGravatar Anton Lundin
This triggers the rest of the code to treat the sensor value as our ppO2 value. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-22Set divemode to FREEDIVE now when we support thatGravatar Anton Lundin
Previous code mapped all our free dive inputs to OC, but now when we actually have a FREEDIVE divemode, we can do better. 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-21Emit 100% progress after quick actionsGravatar Anton Lundin
These actions are basically instant. The infrastructure are in place so if someone feels for building a proper progress, be my guest, but this just makes sure the progress bar acts like in the other cases to the user. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21Emit progress from suunto vyper config operationsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21Emit progress events from firmware updatesGravatar 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-21Add infrastructure to emit progress from threadsGravatar 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-21Refactor device handling threadsGravatar Anton Lundin
This refactors the device handling threads into having one common ancestor class. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-21CCR option: display o2 sensor dataGravatar willem ferguson
This patch creates the possibility of viewing the individual sensor values when the po2 button on the profile toolbar is activated. This follows exactly the procedure for optionally displaying the setpoint values while viewing po2. A checkbox in the preferences panel determines whether sensor information is shown. By default it is set to OFF. When checked, and the po2 button is activated, sensor1 values are shown in grey, sensor2 in blue and sensor3 in brown. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20UI for pSCR preferencesGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Latest strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Getting ready for Beta 1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Don't divide 0/0 when using a PSCR with 100% oxygenGravatar Robert C. Helling
Reported-by: Anton "glance" Lundin <glance@acc.umu.se> Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Adopt planner gas calculation to PSCR mode and include low pO2 warningGravatar Robert C. Helling
[Dirk Hohndel: fixed obvious compile problem] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Fix build problemGravatar Dirk Hohndel
In commit 86c961614bfa ("Actually walk all dive computers, don't just claim to do so") I somehow managed to forget one hunk of the patch (I was editing out debug messages). And I clearly forgot to test compile the final patch as pushed. Apologies. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-20Use SAC from preferences for PSCR oxygen dropGravatar Robert C. Helling
The ratio between SAC and oxygen metabolism rate can be assumed constant but not the metabolism rate. So we better base our calculation on the ratio that uses the SAC from the preferences as that pairs well with the O2 consumption from the preferences. Hence we ran remove the sac parameter from fill_pressures(). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Actually walk all dive computers, don't just claim to do soGravatar Dirk Hohndel
If the first dive computer had pressure samples, but the second one (and no higher one) did, then we would draw a flat horizontal line for the tank pressure graph (but lable it with the correct pressures). This routine that is hunting for the actual maxima and minima does have to really go through all dive computers, not just "this one and up". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Remove the two annoying debug statementsGravatar Dirk Hohndel
These should have been removed ages ago... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19While editing the coordinates we need to compare to the displayed_diveGravatar Dirk Hohndel
Comparing to the master dive only made sense when we immediately modified a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Merge branch 'latestmaster'Gravatar Dirk Hohndel
2015-01-19Hide the old flag when editing a location on the mapGravatar Dirk Hohndel
This ONLY hides the old flag if the current dive is the only dive on that location (which seems to make sense). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Show a flag when editing a location on the globeGravatar Dirk Hohndel
Since we don't modify the dive list, the new flag wouldn't show up until we accepted the change - that's not user friendly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Don't just change the location when double clicking on the globeGravatar Dirk Hohndel
Instead be consistent with other parts of the code and put us in editing mode so the user can accept / reject the change. See #800 Fixes #801 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Always updated the coordinates from the displayed_diveGravatar Dirk Hohndel
That's why it's called the displayed dive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Fix extreme sluggish profile over timeGravatar Tomaz Canabrava
Whoa, this deserves a good explanation. Everytime that the mouse moved in add / plan mode, or anytime a new dive was displayed on the profile, this method would be called and connect the dataModel to the modelChanged method. This added the slot in a call-vector that the fired signal would call, adding one call to the Slot per add / plan mouse move (about 20x/s) or each time a new dive was displayed. Quickly filling the vector with more than 200 - 300 calls to this same Slot. The fix is to only connect one time. this made the add / plan mode *so* much smoother... :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Only update the "add dive profile / plan dive" 20x/sGravatar Tomaz Canabrava
We were updating the dive quite a lot of times, we really didn't need to. This will help, but not fix, the issues with plan / add dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Fix build: add missing #includesGravatar Thiago Macieira
qt-ui/profile/profilewidget2.cpp:1351:10: error: invalid use of incomplete type ‘class QDebug’ qt-ui/printlayout.cpp:141:27: error: variable ‘QPointer<ProfileWidget2> profile’ has initializer but incomplete type In commit f9ceff009b35 ("Clean up the header files") things got broken for an as of now unreliesed future version of Qt. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Move the heart rate graphGravatar Joakim Bygdell
Move the heart rate graph down to the same space as the tissue saturation graph so that it does not overlap with temperature or partial pressures. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>