mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use the new get_o2()/get_he() helper functions more widely
They do the "02=0 means air" thing autmatically, and make for less typing. So use them more widely in places that looked up the o2 and he permille values of a gasmix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
99070c49e2
commit
1b05d28944
4 changed files with 12 additions and 13 deletions
|
|
@ -1877,8 +1877,8 @@ static void calculate_deco_information(struct dive *dive, struct divecomputer *d
|
|||
int cylinderindex = entry->cylinderindex;
|
||||
|
||||
amb_pressure = depth_to_mbar(entry->depth, dive) / 1000.0;
|
||||
fo2 = dive->cylinder[cylinderindex].gasmix.o2.permille ? : O2_IN_AIR;
|
||||
fhe = dive->cylinder[cylinderindex].gasmix.he.permille;
|
||||
fo2 = get_o2(&dive->cylinder[cylinderindex].gasmix);
|
||||
fhe = get_he(&dive->cylinder[cylinderindex].gasmix);
|
||||
double ratio = (double)fhe / (1000.0 - fo2);
|
||||
|
||||
if (entry->po2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue