subsurface/core
Linus Torvalds 9005274986 Make "is_gasmix_redundant()" more robust
The gas switch event handling is somewhat fragile, mostly because the
legacy event encoding for gas switches is odd.  It's also limited to
whole percentages, unlike our internal gas mix model.

In addition, it also ends up comparing the values to the raw permille
values, which is wrong for air, and wouldn't match our O2_IN_AIR which
is 209 permille (closest approximation to 20.946%).

So handle air separately, since "21" really is a valid oxygen value for
air, and should match 20.9%.  And use the proper accessor functions to
get the gasmix values.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:37:18 -07:00
..
subsurface-qt Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
android.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
checkcloudconnection.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
checkcloudconnection.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
cloudstorage.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
cloudstorage.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
CMakeLists.txt Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
cochran.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
cochran.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
color.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
color.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
compressibility.r Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputer.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputer.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputerthreads.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputerthreads.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
datatrak.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
datatrak.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
deco.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
deco.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
device.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
device.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
devicedetails.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
devicedetails.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
display.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
dive.c Make "is_gasmix_redundant()" more robust 2016-04-04 22:37:18 -07:00
dive.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divecomputer.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divecomputer.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divelist.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divelist.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divelogexportlogic.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divelogexportlogic.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divesite.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divesite.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divesite.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divesitehelpers.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
divesitehelpers.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
equipment.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
exif.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
exif.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
file.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
file.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gas-model.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gaspressures.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gaspressures.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gettext.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gettextfromc.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gettextfromc.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
git-access.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
git-access.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gpslocation.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
gpslocation.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
helpers.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
imagedownloader.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
imagedownloader.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
isocialnetworkintegration.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
isocialnetworkintegration.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
libdivecomputer.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
libdivecomputer.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
linux.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
liquivision.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
load-git.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
macos.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
membuffer.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
membuffer.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
metrics.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
metrics.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
ostctools.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
parse-xml.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
planner.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
planner.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
pluginmanager.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
pluginmanager.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
pref.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
prefs-macros.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
profile.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
profile.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qt-gui.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qt-init.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qthelper.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qthelper.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qthelperfromc.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
qtserialbluetooth.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
save-git.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
save-html.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
save-html.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
save-xml.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
serial_ftdi.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
sha1.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
sha1.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
statistics.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
statistics.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
strndup.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
strtod.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
subsurfacestartup.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
subsurfacestartup.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
subsurfacesysinfo.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
subsurfacesysinfo.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
taxonomy.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
taxonomy.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
time.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
uemis-downloader.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
uemis.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
uemis.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
units.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
version.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
version.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
webservice.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
windows.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
windowtitleupdate.cpp Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
windowtitleupdate.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
worldmap-options.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
worldmap-save.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
worldmap-save.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00