aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)Author
2017-03-11Dive No. > Dive #Gravatar Martin Měřinský
2017-03-11divespot > dive spotGravatar Martin Měřinský
2017-03-11divelog > dive logGravatar Martin Měřinský
2017-03-11divemode > dive modeGravatar Martin Měřinský
2017-03-11We use 'setpoint' in UI. Use it also for documentation and comments. No ↵Gravatar Martin Měřinský
semantic change.
2017-03-11Use abbreviations with dots.Gravatar Martin Měřinský
2017-03-11unkn > unknownGravatar Martin Měřinský
2017-03-11SAC: %.*f%s/min versus SAC:%.*f %sGravatar Martin Měřinský
2017-03-11Change type of divedatepoint.depth to depth_tGravatar Robert C. Helling
... for consistency, while we are at it. There are still some internal depth variables which are ints somebody might take a go at those. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-11Make depth conversion work for negative depthsGravatar Robert C. Helling
This is needed in the altitude pressure conversion as there negative altitudes are possible (for diving in the netherlands or the Dead Sea). Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-11Disable minimum gas calculation for recreational modeGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Minimum gas calculation - Calculations and UI parametersGravatar Stefan Fuchs
Add minimum gas calculation to planner output. Add the two UI parameters prefs.sacfactor and prefs.problemsolvingtime. Connect UI signals and slots for recalculation of diveplan. Disable minimum gas calculation if there was already a warning before. If minimum gas result is larger then cylinder start pressure give warning message instead of result. Add line break before pO2 warnings but only if warnings exist. Signed-off-by: Joachim Ritter <jritter@bitsenke.de> Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-07In weights table 'weight' is redundant and no used for other types.Gravatar Martin Měřinský
2017-03-07Enable translate 'All' in yearly statistics.Gravatar Martin Měřinský
2017-03-04Add helper to parse duration textGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04heartrate, heartbeat > heart rateGravatar Martin Měřinský
2017-03-04Consistent 'salt water' versus 'fresh water'.Gravatar Martin Měřinský
2017-02-24Add subsurface_stat for MacGravatar Dirk Hohndel
Which is also used on iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-24Fix "Load/Save to cloudstorage" for non-ASCII user namesGravatar Jeremie Guichard
On Windows that would fail because stat() doesn't deal well with our utf8 strings. Added new subsurface_stat() portability function to replace stat(). Added Windows implementation of subsurface_stat() using wstat(), with conversion to ut16 of the inputed path. Other platform implementations (linux, android) make use of the normal stat(). Added non ASCII test case in TestGitStorage::testGitStorageLocal() Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-02-21Dive merge: don't pick an empty dive siteGravatar Dirk Hohndel
When merging, we should treat an empty dive site (which will be deleted on save) the same as not having a dive site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-21Many filenames are const stringsGravatar Robert C. Helling
So we can use string constants for those Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-21Translate names of additional dive events and nicer format info box textGravatar Stefan Fuchs
Enable translation for a few additional internal dive events. Ensure that all event names in datatrak.c are collected for translation. Ensure that for gaschange in profile info box the "cyl." string is also translated. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-21Unknow > UnknownGravatar Martin Měřinský
2017-02-19Fix dive site string mergingGravatar Linus Torvalds
If the second dive site doesn't have a particular string, but the first one does, we did the wrong thing and created a result string like (first dive site string) or ((null)) which is not useful. We should just use the first dive site string as-is. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-19Fix typo in saturation/desatureation ratesGravatar Robert C. Helling
This patch eliminates the difference between the saturation and desaturation rates. This was probably once meant as a conservative measure but the desaturation rate was increased rather than the saturation rate (which is probably a typo, as reported by Stefan). Since there is no good basis for this anyway, this patch sets both factors to 1.0 (and if accepted the whole factor business should be removed). This makes our deco times slightly longer. But in the past, we had introduced a 1.2% fudge factor in the critical radius calculation to add conservatism and match the benchmark better. Removing this fudge factor brings us close to the benchmarks. Expected test values updated. Reported-by: Stefan <sjti@gmx.net> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-19Update exif.cpp from upstreamGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-19Properly handle dive sites loaded from XMLGravatar Linus Torvalds
We used to always create a new dive site structure when loading dive site data from XML. That is completely bogus, because it can (and does) create duplicate dive sites with the same UUID. Which makes the whole UUID pointless. So instead, look up the existing dive site associated with the UUID loaded from the XML, and try to merge the data properly if we already had dive site information for that UUID. Reported-by: Alessandro Volpi <volpial@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-19dive merging: merge water temperature too, not just air temperatureGravatar Linus Torvalds
I have no idea why we only merged air temperatures. But it was very explicit (even the function doing the merging was named "merge_airtemp()"), and water temperatures were left alone. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-17Handle negative dates (before the epoch) betterGravatar Linus Torvalds
The Qt model sorting for the dive date was using a unsigned number, which doesn't work for dates before 1970. Also, the dive date parsing got the year 1900 wrong. Not that we really care, because other parts of date handling will screw up with any date before the year 1904. So if you claim to be diving before 1904, you get basically random behavior. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-15Fix crash when merging dives with a missing dive computer modelGravatar Linus Torvalds
The test for the dive being a planned dive was completely bogus: - it should use "same_string()" which correctly checks for NULL - the string it checks for is obviously spelled wrong anyway. Reported-by: Alessandro Volpi <volpial@gmail.com> Fixes: a031dbbbd ("When merging planned dives keep all cylinders") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-11Set up gaslist only in the beginning of diveplanGravatar Robert C. Helling
In the beginning of the diveplan, divedatapoints of zero duration indicate available gases with the depth giving the suggested switch depth. Zero-duration datapoints in the middle of the dive do not have this meaning and should thus be ignored when composing the gaslist. The tests should have these gas defining segments in the beginning. This fixes a problem when replanning a dive that would change to random gases during deco. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-11Always show manually added gaschanges in notesGravatar Robert C. Helling
In the manually entered part, we dont wait until the next stop. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-10Reset VPM-B state between repetitive divesGravatar Robert C. Helling
This resets the maximum crushing pressures and the maximal ambient pressure between repetitive dives to prevent anomalies that a dive produces a shorter deco when following another one than without. Reported-by: sfuchs@gmx.de Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09Make cylinder merging a bit more carefulGravatar Linus Torvalds
This makes some further updates to the new cylinder merging code: - avoid re-using the cylinder if the usage type (OC/diluent/O2) is different between the two dives, even if the gasmix might be the same. - avoid re-using a cylinder if the user has manually added pressure data for it (and the pressures don't match) - when deciding to reuse a cylinder, make sure that we merge as much of the type information as makes sense. This will potentially result in more cylinders that might need manual cleanup, but at least we won't be throwing out user data. And in most cases where merging happens, none of this is an issue (because the data comes fresh from a dive computer, and won't have been manually edited to trigger the new rules). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-09Rewrite cylinder merging code from scratchGravatar Linus Torvalds
The old cylinder merging code depended on the preferred dive having all the cylinders, and the newly merged dive was just forced to pick from that existing set of cylinders. That worked ok if you have a "main" dive computer that you have all the gases programmed for, and you download that first, and then you download any secondary data later. But it completely messed up if the second dive computer had gases that the first one didn't know about, and just basically ended up doing random things. This rewrites the whole thing to actually try to create a union of the two sets of cylinders when merging, with sane matching so that if the cylinders match you won't get duplicates. Miika Turkia hit this when he only used one gas, but had several gases defined in his OSTC that he downloaded after his Vyper (with had just the single gas defined). This should fix that case (at least it does for my xml merging test-case that showed the same problem after some munging). Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-05Finish removal of informational_prefsGravatar Dirk Hohndel
And make export-html build again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05Merge informational_prefs into git_prefsGravatar Joakim Bygdell
There is no need to have two variables for the same purpose. [Dirk Hohndel: changed to keep the two separate functions as otherwise we no longer parse existing repos successfully] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05MOBILE: Read profile settings from gitGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-02-05Save profile settings to gitGravatar Joakim Bygdell
In order to streamline the view between desktop and mobile we need to save selected profile related settings to git. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-02-04Treat gaschanges at 1s as inital gas useGravatar Robert C. Helling
When the first leg in the planner is not cylinder 0, a gaschange event at t=1s is inserted. In the profile, we should treat that as inital gas, so no pressure information is printed for cylinder 0 that is used nominally for one second. This fixes a problem reported by Willem. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-04Bugfix planner output formating (linebreaks)Gravatar Stefan Fuchs
Changed the markup with <div> and <br> tags of the planner output in a way that is is a good compromise for both displaying in UI and printing. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-03Don't do strcmp on NIL pointerGravatar Robert C. Helling
This is what we have same_string() for... This prevents a crash when saving a dive in the planner. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Same typo, two more timesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Win32: add the --win32log option to log stdout and stderr to filesGravatar Lubomir I. Ivanov
Adding --win32log as the first command line option on Windows will now log all stdout and stderr output to the files subsurface_err.log and subsurface_out.log in the working directory. This change required a new argument 'bool logfile' to be added to: subsurface_console_init() which is defined in all platform files (linux.c, macos.c, etc.) Example usage: subsurface.exe --win32log -v -v -v Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-02-03Do not count gas used in planned dives for statisticsGravatar Robert Helling
This is important if in one dive we have the real dive and a planned version of the dive as different computers using different sets of cylinders. [Dirk Hohndel: an early version of this was mistakenly pushed out by me; I reverted that and added this commit since fixing things up as I had done for the other two patches made things nearly unreadable] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Correct: Handle more tanks than gasmixesGravatar Robert Helling
When Suunto Vytecs are used in gauge mode they don't record gasmixes. If a tank pressure sensor is present they nevertheless record the pressures. This patch handles this situation by assuming the tanks contain air (and warning the user about this). [Dirk Hohndel: I had mistakenly pushed out an earlier version of this commit, so this fixes things up to the final version] Reported-by: antonnorth@gmail.com Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Correct "When merging planned dives keep all cylinders"Gravatar Robert Helling
When merging a real dive with a planned dive (for comparison), we should not try to be clever in merging similar cylinders, rather keep the union of both cylinder sets as the two versions of the dive might differ in exctly which gas and how much of it was used. Increase MAX_CYLINDERS to 20 to make room for this. We warn if we exceed this number. [Dirk Hohndel: I had mistakenly pushed out an earlier version of this commit, so this fixes things up to the final version] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Revert "In statistics, ignore gas use of planned dives"Gravatar Dirk Hohndel
This reverts commit 1d8662006cbb5edae941315e30ede381c23a817b. Mistakenly pushed to master Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03Deal with some of the whitespace issues in planner.cGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>