summaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2017-07-20 14:39:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-20 17:32:54 -0700
commit11a0c0cc701806ccec975c67d27dec97fbb13b1f (patch)
tree15a3ace16588b80a88fea76cec30386414bfc3f7 /core/dive.h
parent94d8abd1a292ac0b02064c906da3a66ccf9e6737 (diff)
downloadsubsurface-11a0c0cc701806ccec975c67d27dec97fbb13b1f.tar.gz
Unify sample pressure and o2pressure as pressure[2] array
We currently carry two pressures around for all the samples and plot info, but the second pressure is reserved for CCR dives as the O2 cylinder pressure. That's kind of annoying when we *could* use it for regular sidemount dives as the secondary pressure. So start prepping for that instead: don't make it "pressure" and "o2pressure", make it just be an array of two pressure values. NOTE! This is purely mindless prepwork. It literally just does a search-and-replace, keeping the exact same semantics, so "pressure[1]" is still just O2 pressure. But at some future date, we can now start using it for a second sensor value for sidemount instead. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/dive.h b/core/dive.h
index 2565b4af0..73de24b61 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -194,8 +194,7 @@ struct sample // BASE TYPE BYTES UNITS RANGE DE
depth_t depth; // int32_t 4 mm (0-2000 km) dive depth of this sample
depth_t stopdepth; // int32_t 4 mm (0-2000 km) depth of next deco stop
temperature_t temperature; // int32_t 4 mdegrK (0-2 MdegK) ambient temperature
- pressure_t cylinderpressure; // int32_t 4 mbar (0-2 Mbar) main cylinder pressure
- pressure_t o2cylinderpressure; // int32_t 4 mbar (0-2 Mbar) CCR o2 cylinder pressure (rebreather)
+ pressure_t pressure[2]; // int32_t 4 mbar (0-2 Mbar) cylinder pressures (main and CCR o2)
o2pressure_t setpoint; // uint16_t 2 mbar (0-65 bar) O2 partial pressure (will be setpoint)
o2pressure_t o2sensor[3]; // uint16_t 6 mbar (0-65 bar) Up to 3 PO2 sensor values (rebreather)
bearing_t bearing; // int16_t 2 degrees (-32k to 32k deg) compass bearing