aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-11-07Show extra data in separate tab on MainTabGravatar Dirk Hohndel
This way any extra data probided by the dive computer is visible to the user (without other processing). This data cannot be edited by the user as it reflects the information given by the dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07Load and save extra data in git formatGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07Load and save extra data in Subsurface XML formatGravatar Dirk Hohndel
Includes test dive to test missing attributes and the overall syntax. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07Add helper function to add extra_data to dive computerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-06Add list of string pairs to dive structureGravatar Dirk Hohndel
This extra_data is designed to hold unstructured data from the dive computer. Things like battery voltage. Deco algorithm. Whatever the dive computer wants to report to us. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-06Reset counters when importing new MK6 logGravatar Miika Turkia
Naturally the pressure counters and cylinder index must be reset to zero when reading in a new Poseidon dive log. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-06Include po2 on Shearwater importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-05Always copy data in copy and paste modeGravatar Dirk Hohndel
While in a multi dive edit we want to apply our usual semantics (only edit things that are the same as in the current dive), when doing an explicit copy and paste that doesn't seem to make sense. So we manually override that behavior. Fixes #753 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Make sure we don't use the 'changed' flag uninitializedGravatar Dirk Hohndel
Valgrind reported this while I was testing the previous commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Change tank editing behavior for multi dive editGravatar Dirk Hohndel
Previously we only applied the type of tank (description, volume, working pressure) to all selected dives where the tank description matched. With this patch we also copy the gas mix into all matching cylinders. Additionally this addresses the issue that we should have a separate copy of the cylinder description string for each dive. Fixes #754 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Use the CCR corrected gases for EAD and END calculationsGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Offer to save to a copy in replan modeGravatar Robert C. Helling
When replannig a dive, offer another button that creates a new dive rather than overwriting the old. This should help in creating several versions of a planned dive (longer/shorter, deeper/shallower etc). Note that this makes dives that start at the same time not influcence each other's deco. Also, only the first of a row of simultaneous dives contributes to the tissue loadings of later dives. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Prepare for PSCR calculationsGravatar Robert C. Helling
Calculations for passive semi-closed rebreathers are pretty much like OC except the pO2 is lower bey a certain (SAC dependent) factor. This patch introduces the corresponding calculations in case dctype == PSCR which is so far never set and there is currently no UI for these calculations. As pO2 is SAC dependent it takes a certain attempt at getting it and drops to defaults from the prefs otherwise. As there is no UI at this point and I also don't have any dives, this has not received much testing, yet, but it compiles. At least. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Don't track gas consuption on CCR legsGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-04Replace alpha value of gray star with lighter grayGravatar Robert C. Helling
It seems, on Linux qrgba does not work properly making stars with alpha red when selected. So the patch returns to just rgb without transparency but decreases the contrast to white by a factor of 5. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Correctly unselect trips when dive list filters changeGravatar Dirk Hohndel
Oddly Qt left the trips selected (but all dives where unselected in the UI). This got our internal state rather confused. With this change we clean up that mess and go back to just having those dives that were originally selected and are still visible show up as selected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Improve selection behavior of the multi filterGravatar Dirk Hohndel
Only dives that remain visible stay selected. And if all selected dives are removed by the filter, pick a new selected dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Make invisible stars stand out lessGravatar Robert C. Helling
As my wife kept pointing out for a long time, the greyed out stars were heavier as images than the yellow selected stars. This patch makes the grey stars semi-transparent. Signed-off-by: Robert C. Helling <helling@atdotde.de> Acked-by: Andrea Fischer-Helling <andrea@fraufischer.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Fix position and size of the FilterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Start with 0 when computing maxdepth when fixing upGravatar Robert C. Helling
This is needed to get the correct maxdepth when replanning leads to a shallower dive. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Calculate nitrogen and helium gas pressures for CCR after import from CSVGravatar willem ferguson
Currently the gas pressures stored in structures of pressure are calculated using the gasmix composition of the currently selected cylinder. But with CCR dives the default cylinder is the oxygen cylinder (here, index 0). However, the gas pressures need to be calculated using gasmix data from cylinder 1 (the diluent cylinder). This patch allows setting the appropriate cylinder for calculating the values in the structures of pressure. It also allows for correctly calculating gas pressures for any open circuit cylinders (e.g. bailout) that a CCR diver may use. This is performed as follows: 1) In dive.h create an enum variable {oxygen, diluent, bailout} 2) Within the definition of cylinder_t, add a member: cylinder_use_type This stores an enum variable, one of the above. 3) In file.c where the Poseidon CSV data are read in, assign the appropriate enum values to each of the cylinders. 4) Within the definition of structure dive, add two members: int oxygen_cylinder_index int diluent_cylinder_index This will keep the indices of the two main CCR cylinders. 5) In dive.c create a function get_cylinder_use(). This scans the cylinders for that dive, looking for a cylinder that has a particular cylinder_use_type and returns that cylinder index. 6) In dive.c create a function fixup_cylinder_use() that stores the indices of the oxygen and diluent cylinders in the variables dive->oxygen_cylinder_index and dive->diluent_cylinder_index, making use of the function in 4) above. 7) In profile.c, modify function calculate_gas_information_new() to use the above functions for CCR dives to find the oxygen and diluent cylinders and to calculate partail gas pressures based on the diluent cylinder gas mix. This results in the correct calculation of gas partial pressures in the case of CCR dives, displaying the correct partial pressure graphs in the dive profile widget. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Delay replot of dive so changes aren't overwritten too earlyGravatar Dirk Hohndel
When changing tanks we triggered a replot - but that overwrote the displayed_dive with the current_dive before the remaining data from the displayed_dive was used to edit the current_dive. So now we delay this until later in the function, this way copy of paste of both tanks and weights works. Fixes #753 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Fix two more potential crashes for dives without samplesGravatar Dirk Hohndel
This should be all of them (famous last words). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-02Prevent segfault for dive with gas change but no samplesGravatar Dirk Hohndel
Not quite sure where such a dive would come from, but anyway, just don't dereference the pointer unless it's non-NULL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Don't call strdup on NULL by mistakeGravatar Dirk Hohndel
Hunting down a different issue I managed to cause a crash here when trying to copy a string that ended up being NULL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Remove code that zeroes out duplicate oxygen sensor and temperature valuesGravatar willem ferguson
Remove the code that changes all duplicate oxygen sensor, setpoint and temperature values from a dive log to zero. One of the motivations is that a zero setpoint value indicates an Open Circuit dive segment, not Closed Circuit Rebreather. The code in dive.c is removed and the comments for the corresponding restoration code that restores the last known values into sensor or temperature with zero values is [fill_o2_values() in profile.c] is changed to apply to the present situation. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Replace Poseidon example dive log files in dives directoryGravatar willem ferguson
The present example files have dives with some unusual characteristics due to the fact that the dive pushes the limits of the Poseidon recreational rebreather. Replace these example files with a dive that does not have any unusual characteristics. This facilitates debugging of the Poseidon code. The xml file represents the same dive as the two text files. The xml file will ultimately be removed. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Add pressures to cylinder declaration for MK6 importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Remove code causing problems with CCR dive log rendering.Gravatar willem ferguson
Currently, if there is a po2 given in the dive log, the dive is assumed to be CCR. When a CCR dive has a fo2 of 100%, then the po2 is set as the same as ambient pressure. This destroys the CCR po2 graph in the dive profile that derives from oxygen with a fo2 of 100% in one of the cylinders but which, after adding the dilent gas, has a po2 far below ambient pressure. The calculation for 100% oxygen only applies to deco using 100% o2 and then the dive computer calculates the appropriate po2. This patch removes the setting of po2 to ambient when fo2 is 100%, 1) to enable accurate graphing of po2 values for CCR dives using 100% o2 in the first cylinder. 2) To use the po2 value reported by the DC in the first place. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Fix inconsistent search result in HTML exportGravatar Gehad elrobey
The advanced search drop down menu always showed the user selected settings, even if this is a customized search (tag, location) that took place by clicking on the search quick hyperlink. This is fixed by saving the user default search preferences and changing them temporarily when quick hyperlinks searching is used. Fixes #723 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Show single buddies instead on the filter.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Add modified strings to the translation sourceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Capitalisation in file type listGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Adjusts tissue graph buttonGravatar Tim Wootton
Tool tip not needed, text already provided on mouse-over Corrects captitalisation style Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Make filter UI comply with capitalisation styleGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Text adjustments to configuredivecomputerGravatar Tim Wootton
Use 2 subscript on ppO2 Adhere to agreed capitalisation style Reset instead of resetted Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01Fix partial pressure graph thresholdsGravatar Dirk Hohndel
Since we only store things in the preferences if they are different from the default, the existing code that simply compared with the settings value didn't work when people used the defaults. We now compare to the actual preference at runtime which should address that. Fixes #731 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Latest strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Fix selection on the list model.Gravatar Tomaz Canabrava
forgot to add that we used multiselection when I recreated the dive list. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Avoid repeated layout namesGravatar Giuseppe Bilotta
Multiple layouts had the same name="gridLayout_3". Fix by shifting all the numbers up by 1. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Add .txt to notes on MK6 importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Add gas mixes to MK6 importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Small random whitespace cleanupsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Added the widget on the screen, fix a typo.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Implemented the LocationFilter widget.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Repopulate the LocationFilter when lading a dive file.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31FilterRow implemented for LocationFilter.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Repopulate method on LocationFilterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31setData method for LocationFilter.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Implemented the flags method for LocationFilter.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>