On 11/01/2024 21:27, Robert Helling wrote:
I have a question re the Divesoft Liberty CCR. From their website I understand 
it has a total of four (2x2) O2 sensors rather than the three other rebreathers 
have. We now had a user reporting Subsurface to crash when handling a dive from 
that computer and looking at the subsurface source there is indeed an assert 
that makes sure there are no more than three sensors. Obviously that is not 
correct (but leave aside for a moment the question how a voting logic actually 
is supposed to work with four sensors).

Looking at libdivecomputer/src/divesoft_freedom_parser.c it seems, that 
correctly reports the number of sensors to be 4 but when actually reporting 
data from the sensors it reports the data from all sensors as if it were only 
one. Or am I misreading the code? Does the computer actually report which 
sensors are voted out? Is there a way for subsurface to assign the values to 
the individual sensors?

Libdivecomputer reports the sensor number, or DC_SENSOR_NONE if the data is not from a sensor (for example the voted/average ppO2):

https://github.com/libdivecomputer/libdivecomputer/blob/master/src/divesoft_freedom_parser.c#L911
https://github.com/libdivecomputer/libdivecomputer/blob/master/src/divesoft_freedom_parser.c#L1023

You can use this info to distinguish between the different sensors.

Libdivecomputer does not support reporting whether a sensor was voted out. The freedom dive computers do record this info, so this is something that could be added (although no other dive computers supports this). Currently we only use the sensor state bits to exclude sensors that are not available or not calibrated.

Jef
_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to