summaryrefslogtreecommitdiffstats
path: root/core/equipment.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2016-04-02 11:13:35 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 22:37:18 -0700
commit900527498690c80b5303a608002431966bacae93 (patch)
tree8e44c58149d0420728b038611741201e76d01361 /core/equipment.c
parenteb5907ab3b8805d4c9990cba45ac4b46f6e5cdb8 (diff)
downloadsubsurface-900527498690c80b5303a608002431966bacae93.tar.gz
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>
Diffstat (limited to 'core/equipment.c')
0 files changed, 0 insertions, 0 deletions