summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-11-10Use correct surface pressure to detect ceiling with Uemis ZurichGravatar Dirk Hohndel
The dive data contains the surface pressure prior to the dive, and that is what we need to compare p_amb_tol to, not the standard 1013mbar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10Create the correct ceiling events for Uemis ZurichGravatar Dirk Hohndel
The hold_depth field is rather misleading as it normally gives the safety stop depth and only when the p_amb_tol goes "below the surface" does it switch to showing the first deco stop depth. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10Instead of the ugly red boxes make the surface come down to ceilingGravatar Dirk Hohndel
Based on suggestions from Linus (and a few iterations) we now simply have the surface (i.e., background color / pattern) come down to where the ceiling is. And we only do the angry red shading when the diver violates the ceiling. I think this looks much better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10Ignore last dive read from Uemis when starting with empty divelistGravatar Dirk Hohndel
When the user closes the divelist and starts with an empty file it makes no sense to assume that she only wants to download new dives since the last time dives have been downloaded. So if the current divelist is empty we ignore that information and start from the beginning again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10Add plotting of the deco ceilingGravatar Dirk Hohndel
Plot a red-shaded area on top of the depth profile to indicate the deco ceiling (i.e., the area into which it isn't save to ascend at this point of the dive. So far this is of very limited use as libdivecomputer doesn't give us the necessary information to plot this. I have sent patches for the OSTC to Jef, hoping that he will include them in an update. I don't know how many other dive computers will make this data available - I still need to add this to our native Uemis support. This commit also fixes two cut and paste errors in the previous commit 6540be9bd924 "Process ceiling events and store ceiling data in plot_info". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-10Process ceiling events and store ceiling data in plot_infoGravatar Dirk Hohndel
This just creates the infrastructure but doesn't yet do anything useful with the data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-07Fix partial pressure calculationGravatar Dirk Hohndel
The existing implementation failed on dive computers that did gas changes based on events (instead of tracking them in the sample data like the Uemis Zurich does that I tested the code with). This commit moves the calculations slightly later in create_plot_info() after the gas change events are processed and the plot_info data has been fixed up. Now this works with the data from Linus' Suunto as well. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-06Merge branch 'po2'Gravatar Dirk Hohndel
Plotting pO2 / pN2 / PHe
2012-11-06Remove pN2 debug printout and add disabled code for partial pressure scaleGravatar Dirk Hohndel
The pN2 print shouldn't have been committed, but I don't want to try and rewrite all the commit history. Oh well. The pressure scale I am ambivalent about. It seems that it should be useful - but that would require guide lines that coincide with the values which would really throw off the visual for me. So I added the code, but left it disabled. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-06Don't print mean depth across the whole profile areaGravatar Dirk Hohndel
I can't remember why we initially did this instead of ending the horizontal red line whith the last data point of the pressure profile. But especially nuw with more graphs shown the one line that extends past the end of the dive looked really silly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-06Be smarter about printing gas partial pressure textGravatar Dirk Hohndel
We always want to print absolute maxima and minima - but not when multiple consecutive data points all have the same value (this happens, for example, when printing a pHe plot on non-helium dives - or when the dive profile includes a brief surface intervall which causes all the partial pressures to be at their minimum). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Fine tune the vertical spacing of the graphsGravatar Dirk Hohndel
Whatever I pick here, there will be dives where the different graphs end up interfering with each other. I don't think there isn't an easy, generic solution for this (but I can envision awesome non-easy solutions - they just don't seem to be worth the effort). But for most dives that I played with this seems to work pretty well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Fix incorrect variable reuse bug in preferences dialogGravatar Dirk Hohndel
This was introduced in commit ee803ef5d85b "Change preferences into a notebook and add second page for tec settings" In order to be able to get the new default XML file name back from the button, we need to keep that variable around and not overwrite it with more buttons for the tec preferences page. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Prevent UI errors while the the import thread is runningGravatar Lubomir I. Ivanov
While the import thread is running it is possible to: 1) click the [x] button of the "download dialog". To prevent that, we attach a "delete-event" signal to no-op function. 2) to interact with the main window, once the "accept" event is triggered. To prevent that, we make sure that the window is set back to "modal". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Trim the device name in the download dialog, if necessaryGravatar Lubomir I. Ivanov
On Windows, device names can end up being <drive-letter> (<drive-label>). In such a case we are only interested in the <drive-letter> part, when passing this value to libdivecomputer. This patch provides a method to trim all text in parentheses and also any leading and trailing whitespace. An important addition is enabling back the user to enter a device manually even it's absent in the combo box list. This device is then stored and retrieved as the default device, but not stored in the device list (dc_device_selector()). As a side effect this change prevents the download dialog closing, when a user-entered device is not one of the found devices via subsurface_fill_device_list(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Repair broken Add Dive menu itemGravatar Henrik Brautaset Aronsen
Lubomir's commit aec904b612cbee57f8bb5c3289a120b69c9ade24 broke the Add Dive menu item: The Edit Dive dialogue didn't show up after the initial dialogue. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Fix broken MacOSX buildGravatar Henrik Brautaset Aronsen
Dirk's commit 2de6f796354ad029e9e786027210fcf1b02868e2 had a typo. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Spanish translation fixes.Gravatar Pablo Garcia Castro
Signed-off-by: Pablo Garcia Castro <freixido@gmail.com Signed-Off-By: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Jose Angel Tortosa Delfa <angeltordel@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-05Plot text values for partial pressure graphsGravatar Dirk Hohndel
The algorithms attempt to identify "interesting" points where the user might want to know the value of the graph. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01Add pHe and pN2 plottingGravatar Dirk Hohndel
Adjust the color for pN2 to the standard for this gas (black). We keep pO2 green (even though the ISO 32 color for that would be white). pHe is marked in brown (which is the matching standard color). Calculate correct partial pressures for the synthetic plot info points at the beginning and end of the dive. Minor fine tuning to the positioning / scaling of the temperature plot when partial pressures are plotted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01Fix the pO2 calculation when diving with airGravatar Dirk Hohndel
So few of my dives are on air that at first I didn't notice - but for those dives we set the o2 permille to 0 - which of course causes incorrect (and extremely deadly) pO2 of 0... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01Add vertical space to depth plot if we are showing partial pressure graphsGravatar Dirk Hohndel
Fairly simplistic change that modifies the way we calculate the "maxdepth" for a particular dive as that is used to scale the plot vertically. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01Change preferences into a notebook and add second page for tec settingsGravatar Dirk Hohndel
Not sure this is the best naming scheme (General Settings / Tec Settings) but it's a start. The idea is to have the settings that a recreational diver might care about on the first page, and all the other stuff on the second one. Let's see how this works out long term. For now I moved OTU over and added toggles for the different partial pressure graphs (only the pO2 one is implemented so far). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-11-01First stab at plotting a pO2 graphGravatar Dirk Hohndel
So far this is done unconditionally. This already starts some of the infrastructure for other gases, but so far only O2 is handled. We also need a pressure scale on the right to make this useful - or we need to do peek / trough pressure prints like we do for temperature and depth. Finally, I think I want to move the plot further down, maybe make the whole plot area taller if we are plotting partial gas pressures as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-31Merge branch 'dc-device-selector'Gravatar Dirk Hohndel
Bring the device selector (when downloading from a dive computer) into master.
2012-10-31Show drive name after the drive letter on WindowsGravatar Dirk Hohndel
In the device selector when downloading from a divecomputer add the drive name that we have been looking for (so far that's only "UEMISSDA") to the drive letter - this should make it easier for people to figure out why there is a drive letter offered as an option. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-29windows.c: added device retrieval from subsurface_fill_device_list()Gravatar Lubomir I. Ivanov
subsurface_fill_device_list() now goes trough the list of registry entries in the SERIALCOMM key and adds all present values (such as COM1, COM2) to a GtkListStore. Once done the function compares all logic drive label to a static list of known DC labels, such a 'UEMISSDA', which is the only present one at the moment and adds any matching drive letters (e.g. C:\, H:\) to the list store as well. If no serial ports were added or no matching logical drives were found the function simply adds a default entry named "COM1". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2012-10-29Fix merging of weight systemsGravatar Linus Torvalds
I just tried downloading some duplicate dives I had on my second dive computer, and it all "just worked" and subsurface merged them for me. Almost perfectly. I say "almost", because in merging them, it threw my old weightsystem data away, due to that not being merged. Also, it was a perfect merge only because the computers are so similar that they just line everything up - same water activation logic, same sample interval, same pretty much everything. So while I know the sample merging is not really the right thing to do (it was designed to get the "merge the exact same dive from the same computer" case right), it worked well enough for this particular case. I'll look at something better later. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-29Add depth scale to the dive profileGravatar Dirk Hohndel
This is intended to be unobtrusive, but add more information for people who aren't satisfied with the numeric value we put inside the plot to mark local peaks and troughs. See ticket #9 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-28Updates to the Dutch translationGravatar Reinout Hoornweg
Added missing translations. Reviewed and fixed strings marked fuzzy. Changed date-format to something resembling the usual Dutch notation. Changed names of months to lowercase. Changed translation of divemaster from diveinstructor to diveleader. Fixed some typos. Signed-off-by: Reinout Hoornweg <reinout@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-28Add support for visibility tracking and allow manual entry air tempGravatar Dirk Hohndel
Turns out we had a data field for visibility as a length unit - but never used it. I can never guess how much visibility we actually had on a dive - but I think most everyone can assign a rating between abysmal (zero stars, "I couldn't read my dive computer even right in front of my mask" - trust me, I had some of those dives) to amazing ("five stars, I could see farther than I though possible" - and I had one or two of those, too). So I changed this to an integer and am re-using the star infrastructure we have for the overall dive rating. When displaying this I was dismayed that we are running out of space in the "Dive Notes" notbook. So I moved this to the "Dive Info" notebook. This is not consistent and not logical. I think we need to revisit the notebooks and think about what we want to display where. While adding the infrastructure to manually enter the visibility I went ahead and added the ability to manually enter the air temperature as well (that was one of the things missing in the previous commit). Fixes #7 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-28Display air temperature in the info notebook pageGravatar Dirk Hohndel
So far we don't parse air temperature data via libdivecomputer. Nor are we set up to allow the user to manually enter it. We can parse it when downloading from a Uemis Zurich, though. This feature was suggested via trac.hohndel.org; this commit implements only part of what is requested there, so I simply reference the ticket here without closing it. References ticket #7 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-27Improve the dive computer device selectionGravatar Dirk Hohndel
We try to identify devices that are connected and their matching device names (and mount paths in the case of the Uemis Zurich). Those are presented as a drop down menu to choose from. The user can still override this by simply entering a different device / path name. On Windows this is not functional. How do I find out which drive letter corresponds to the USB device named "UEMISSDA"? Similarly we need code that finds serial ports that are present. For now we once again default to COM3 (so this isn't a step back, but of course it's far from what we want). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-27Correct handling of O2 values below 21%Gravatar Dirk Hohndel
We incorrectly "fixed" those to be 21%. Not useful when diving trimix. Fixes #4 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-27Updated French translation reviewed by Pierre-Yves ChibonGravatar Stéphane Raimbault
Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
2012-10-25Merge branch 'uemis-next'Gravatar Dirk Hohndel
No reason to keep this in a separate branch. If we decide to make a 2.1.1 release we'll simply cherry pick only the fixes.
2012-10-25Expand Uemis Zurich download supportGravatar Dirk Hohndel
With this commit we not only use the getDivelogs command but also the getDive command for each of the dives that was downloaded. Oddly, that makes quite a bit of redundant (and at times slightly contradictory) data available, but also many new things. We now get weight, suit and notes that were stored with a dive in the logbook on the divecomputer. There are a ton more data available that we don't use, yet. For example information about altitude, a decoindex, dive type and dive activity, other equipment information, etc. I still need to decide how much of this I want to make available in Subsurface (and how I want to present this - after all most of this is not available from other dive computers). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-25Allow debug output to go either to log file or to stderrGravatar Dirk Hohndel
This makes it easier to debug things in a debugger, but the infrastructure to send out debug builds where an end user can send in a useful logfile is still in place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-25Missing white-space in Select Events titleGravatar Stéphane Raimbault
Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-24Added confirmation dialog when deleting dives and tripsGravatar Lubomir I. Ivanov
divelist.c: Show a "Yes/No" confirmation dialog when performing delete/remove operations for dives and trips. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-24Removed the delete option by right clicking on "Dive Info"Gravatar Lubomir I. Ivanov
info.c - Removed the additional pop-up menu entry "Delete" - Removed the delete_dive_info() function, which created the yes/no dialog. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-24info.c: Make sure we only edit when there is dive selectionGravatar Lubomir I. Ivanov
1) info.c: always check for "amount_selected > 0" before calling edit_multi_dive_info(). 2) populate_popup_cb() should only add the "Edit" and "Delete" items if there are dives are selected 3) in info_menu_delete_cb() we clear the selection, therefore we need to set "amount_selected" to 0. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-23Updated Slovakian translationGravatar Ďoďo Ivanecký
Signed-Off-By: Jozef Ivanecký (dodo.sk@gmail.com) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Bump version to 2.1v2.1Gravatar Dirk Hohndel
Getting ready for the release Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Update the README with better introduction to SubsurfaceGravatar Dirk Hohndel
This is similar to what we have on the website. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Add Uemis section to the user manualGravatar Dirk Hohndel
This gives some information on some of the oddities when downloading from a Uemis Zurich. Also run a spell checker against the user manual. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Add the Spanish translatorsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Updates to the Spanish translationGravatar Dirk Hohndel
This is the result of a joined effort of several people. Thanks to Pablo Garcia Castro <freixido@gmail.com> Matthias Kaehlcke <matthias@kaehlcke.net> Sergio Schvezov <sergiusens@ieee.org> Auni Somero <aunims@gmail.com> Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Sergio Schvezov <sergiusens@ieee.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Small re-wording in the Bulgarian translationGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-22Use the 'star_strings' buffer to set combo box entries for ratingGravatar Lubomir I. Ivanov
info.c: extended_dive_info_widget() was still using the precompiler macros instead of the 'star_strings' buffer, which may end up being modified if the unicode stars are not supported on a certain OS (UTF8_FONT_WITH_STARS). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>