mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 09:53:24 +00:00
CNS can be higher than 255%
I'm sure this bug has heen here forever, but the CNS clock is not very relevant for most divers, and even some technical divers do not care about this value. However, doing long decompression dives, the value can easily grow over 100%, and a lot further. For example, the OSTC computers use 2 bytes to store the CNS value in the profile data, and I have multiple dives in my logbook going way over 255%. This all said. Just store the CNS value in an unsigned 16 bit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
a013e35ff4
commit
9771255919
1 changed files with 1 additions and 1 deletions
|
@ -214,7 +214,7 @@ struct sample // BASE TYPE BYTES UNITS RANGE DE
|
|||
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
|
||||
uint8_t sensor[MAX_SENSORS]; // uint8_t 1 sensorID (0-255) ID of cylinder pressure sensor
|
||||
uint8_t cns; // uint8_t 1 % (0-255 %) cns% accumulated
|
||||
uint16_t cns; // uint16_t 1 % (0-64k %) cns% accumulated
|
||||
uint8_t heartbeat; // uint8_t 1 beats/m (0-255) heart rate measurement
|
||||
volume_t sac; // 4 ml/min predefined SAC
|
||||
bool in_deco; // bool 1 y/n y/n this sample is part of deco
|
||||
|
|
Loading…
Add table
Reference in a new issue