aboutsummaryrefslogtreecommitdiffstats
path: root/core/helpers.h
AgeCommit message (Collapse)Author
2017-05-26Creation of dive duration string and surface interval stringGravatar Stefan Fuchs
Update the function to create the dive duration string in a way that it can be used also in info and stats tab and added some more flexibility. Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min" (with units and :) or "5min 35sec" (with units with space). Add a new function to create the surface interval string. Completely remove old function get_time_string() and get_time_string_s(). Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-06Consistently show dive duration based on preferencesGravatar Dirk Hohndel
We now respect the settings in the preferences and also only show the duration as minutes and seconds if the dive is a free dive. Fixes #361 Fixes #362 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to remaining core filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Add helper to parse duration textGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Add "Dive Computer" settings to SettingsObjectWrapperGravatar Tomaz Canabrava
For some reason, the dive computer settings weren't in the settings prefs. This moves it, makes the boilerplate on Settings ObjectWrapper and make things compile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-05Remove unused and buggy get_cylinder_used_gas_string() functionGravatar Linus Torvalds
It's good that this is unused, because it does the calculations wrong. Due to the gas compressibility the gas use calculations should subtract the gas_volume() values at the differing pressures, not the pressures themselves. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>