summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-10-14Export to DiveShareGravatar Salvo 'LtWorf' Tomaselli
Adds the possibility of exporting dives to DiveShare. Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> 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-14Fix compilation on other Unix besides LinuxGravatar Thiago Macieira
The linux.c file is really for just generic Unix systems, so adapt the .pro file logic to match. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-14Check that the model is a supported oneGravatar Anton Lundin
This code adds some crude checks to verify that the device is a supported one before we actually read/write from it. This is to white/black-list devices so we don't write or read memory that we don't know anything about. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-13CCR patch: Reorganise the oxygen partial pressure calculationsGravatar willem ferguson
This patch responds to the side effects that the CCR code has had with respect to ceilings in OC dives and dive plans. Dive ceilings are now calculated correctly again. The following were performed: 1) remove the oxygen sensor and setpoint fields from the gas_pressures structure. 2) Re-insert setpoint and oxygen sensor fields in the plot_data structure. 3) Remove the algorithm that reads the o2 sensor data and calculates the pressures.po2 value from function fill_pressures() in dive.c and save it as a separate function calc_ccr_po2() in profile.c. 4) Activate calc_ccr_po2 from function fill_pressures() in profile.c. 5) Move the relative position of the call to fill_pressures() within the function create_polt_info_new() in profile.c. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-13Ignore pictures when parsing divelogs.de importGravatar Miika Turkia
Do not do XML parse on pictures. Currently just ignore them, in the future we might want to save them somewhere and include them in Subsurface logs. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Export additional tanks to divelogs.deGravatar Miika Turkia
All recorded cylinders are exported to divelogs.de. This potentially includes cylinders that have not been used. The start and end pressure for additional cylinders is taken from the cylinder information. Main tank gets this information from first and last pressure reading or from the cylinder information if samples are not available. This should be ok when there is only one cylinder with pressure sensor, but does not probably work for people having multiple sensors. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12CCR patch: Calculate the correct partial gas pressures for CCR divesGravatar willem ferguson
This patch adds code to the function fillpressures() in dive.c to allow calculating o2 pressures, based on the data from the po2 sensors in the system. The following changes were made: 1) add code to perform po2 calculations for CCR with 1, 2 or 3 oxygen sesnors. 2) Add four fields to the gas_pressures structure in dive.h. This allows communication of data between the function that calls get_pressures() and the return of partail pressure values to the calling function. 3) Delete the fields for setpoint and gas partial pressures from the structure plot_info. All partial pressures (from instruments as well as calculated) now reside in the pressures structure that forms part of plot_info. 4) Perform changes in several parts of profile.c to make use of the pressures structure in plot_info. [Dirk Hohndel: yet again massive whitespace cleanup] Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Support for importing additional tanksGravatar Miika Turkia
This patch adds support for importing additional cylinders from divelogs.de. This also adds support for He on the import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Correctly copy all information in an eventGravatar Dirk Hohndel
Instead of trying to use add_event() to reinsert events we simply copy the memory and adjust the pointers. Using add_event() lost the gas mix and gas index information on gaschange events - and this prevent switches between cylinders with the same gasmix to be rendered correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12CCR patch: Oxygen partial pressuresGravatar willem ferguson
This patch does three things: 1) A new function fill_o2_values() is added to profile.c. This fills all oxygen sesnsor and setpoint values that have been zeroed before in order to save space in the dive log. This recreates the full set of sensor values obtained from the original CCR xml log file. 2) Function fill_o2_values() is activated in function create_ plot_info_new() in profile.c 3) The calling parameters to function fill_pressures() in dive.c are changed. The last parameter is now a pointer to a structure of divecomputer. This will be needed in the last patch of the present series of three patches. [Dirk Hohndel: minor whitespace cleanup] Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Remove unused variablesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> 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-12This adds read/write of Suunto Vyper configsGravatar Anton Lundin
This implements the reading and writing of the configuration varables from the Suunto Vyper family devices. Everything here is implemented based on the excellent information on: http://www.sarnau.info/papers:suunto_vyper Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12This saves and restores Suunto Vyper configsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Add backing stores for Suunto Vyper configurationsGravatar Anton Lundin
This adds varables to store all the settings for the Suunto Vyper family. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Remove double-assignment to rc varableGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Initialize everything to zero in devicedetailsGravatar Anton Lundin
Before this, if you did click save backup xml before you read the data, you would get a xml file full of bogus. This initializes everything to zero. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Start sanitizing gaschange event informationGravatar Linus Torvalds
Decode the gasmix data into a sane format when creating the event, and add the (currently unused) ability to specify a gas change to a particular cylinder rather than (or in addition to) the gasmix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Teach uemis downloader about downloading into private tripsGravatar Linus Torvalds
Now that we pass in the full device_data_t information, we can look at the "create_private_dive" flag and decide just how to record newly downloaded dives properly. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12Pass the whole 'device_data_t' to the uemis downloaderGravatar Linus Torvalds
Not only does it make it look more like the libdivecomputer downloaders, but the uemis downloader needs it in order to support all the flags we have. Notably "download into private trip". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-11Just use strdupGravatar Dirk Hohndel
In commit 272f85bb2444 ("Fix silly crash") I indeed fixed the crash, but I also broke the code. Now a broken userid might end upsaved in the data file. Oops. This should be correct now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-11Keeping up the fight for whitespace consistencyGravatar Dirk Hohndel
Sadly, some of the code being fixed is my own... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-11CCR patch: Import and store oxygen sensor dataGravatar willem ferguson
This patch allows the importing of oxygen sensor and setpoint data from Poseidon CCR dive logs. 1) Change parse-xml.c to read up to three oxygen sensor values from xml. and to store the information in sample structures 2) Change parse-xml.c to read o2 setpoint values fro xml and to store it in sample structures 3) Change dive.c to delete all sensor and setpoint values where subsequent samples have sensor/setpoint values that are the same. 4) Change profile.c to store the sensor/setpoint values from the samples into plotinfo. 5) Change the sample Poseidon xml log in the dives directory to ensure the correct order and hierarchy of the dive and divecomputer nodes. [Dirk Hohndel: minor cleanup, removed debug code, whitespace] Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Add export for depths of images takenGravatar Robert C. Helling
This adds an option to the export dialog to write an ascii file containing filenames of image files a tab and the depth at the time of the image taken. [Dirk Hohndel: whitespace cleanup] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Cleanup traling newlinesGravatar Anton Lundin
And there where quite a few. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Use unsigned char to store devicesettings.Gravatar Anton Lundin
C++-11 complains allot about narrowing the int value to unsigned char in the setting of these values to the OSTC3. This clears that warning, and any confusion about these values. Future work: Change these structures to use our "Subsurface"-types instead. 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-10-10Store the setpoint values read from OSTC3Gravatar Anton Lundin
The setpoint values was never stored in the deviceinfo object. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Untangle the graphs at the bottom of the profile.Gravatar Joakim Bygdell
When multiple graphs are displayed at the same time they end up being printed on top of each other. Scale the lowest graph to accommodate the tankbar. Add an intermediate scaling step to the depth axis when pp graphs or the tissue graph are visible. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Add description of gas pressure bar graph to user manualGravatar willem ferguson
The gas pressure bar graph that has recently been added to the Information Box on the dive profile is described here. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10CCR dives: Clear duplicate diluent gas pressure readingsGravatar willem ferguson
This patch concludes the calculation of gas pressure readings for CCR dives. Duplicate diluent gas pressures are removed from the dive structure and set to zero, as is done for the other gases. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-07Fix silly crashGravatar Dirk Hohndel
Who the heck uses strcpy? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-02Don't use switch with just one caseGravatar Dirk Hohndel
This should be an if statement. Gets rid of build warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-02Add possibility to filter by more than one criteria at a timeGravatar Tomaz Canabrava
This new version of the TagFilterSortModel actually accepts *any* new MultiFilterInterface. So, how to use it to create a new filter: Implement a class that inherits from MultiFilterInterface Implement the filterRow method TagFilterSortModel::instance->add( myClass ); and you are done. [Dirk Hohndel: removed some debug code and did whitespace cleanup] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-25Minor changes to Windows build and packagingGravatar Dirk Hohndel
With these changes we link statically against libusb and libdivecomputer but don't add the .a files to our installers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-20Fix typo that broke settings.Gravatar Tomaz Canabrava
A small typo broke the disabling of the graphs for the newly added curves. ( btw, we need a designer to display the graphs in a better way, just too much information. ) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-20Fix crash when moving the mouse over the profile when no dive is shownGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-20Show everything when nothing is checked.Gravatar Tomaz Canabrava
This patch fixes a bit of the logic used. Now we show every dive if nothing is chedked. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-20Update-spanish-translation-of-user-manual-to-english-7bf65e3Gravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-19Add tissue saturation plot to tooltipGravatar Robert C. Helling
This adds a graphical representation of tissue loadings at the current moment during the dive to the tooltip box. The layout is inspired by the Sherwater Petrel.Add tissue saturation plot to tooltip Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-19Tissue saturation plot a la Sherwater PretelGravatar Robert C. Helling
This adds a toolbox icon to turn on a tissue plot inspired by the bar graph of the Sherwater Petrel, It shows the inert gas partial pressures for individual compartments. If they are below the ambient pressure (grey line) they are shown in units of the ambient pressure, if they are above, the excess is shown as a percentage of the allowed overpressure for plain Buehlmann. So it has the same units as a gradient factor. Thus also the a gradient factor line (for the current depth) is shown. The different tissues get different colors, greener for the faster ones and bluer for the slower ones. Positioning and on/off icon action still need some tender loving care. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-19Set O2 partial pressure for CCR dives correctlyGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Pull latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Switch some columns to right alignment in divelistGravatar Anton Lundin
Some columns in the dive list makes more sense to have right aligned than left aligned. This switches the numeric columns to right alignment so they is more easily compared visually. But, we keep the NR-column left-aligned because we use its left indentation as dive-in-a-trip marker. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Add recently changed texts to the translation source fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18Slight change to info tab layoutGravatar Dirk Hohndel
This keeps max depth and average depth next to each other and instead moves air pressure up one row. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18HTML: Cursor is on top of graph tooltipGravatar Gehad elrobey
-change the color of the depth graph slightly to be more readable. -change the tooltip of the depth graph to NW-corner of the cursor. -change the opacity of the tooltip for readability. Fixes #724 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-18HTML: fix typo in dive counterGravatar Gehad Elrobey
adds a missing space to dive counter. Fixes #722 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>