Import: Fix the Handling of ppO2 Sensor IDs.

Instead of assigning sensor ids in the order that values are reported,
actually use the sensor ids reported by libdivecomputer. This will fix
the problem that for some dive computers (e.g. Shearwater) the dive
computer calculated ppO2 is currently reported first, thus pushing out
all actual sensor values.
A new fixed id (7) outside of the range of currently supported sensor
IDs is used for these dive computer calculated values.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2025-01-14 00:23:13 +13:00
parent 9ec1190a30
commit c685f3d6a1
8 changed files with 38 additions and 17 deletions

View file

@ -234,7 +234,7 @@ void ProfileScene::updateVisibility(bool diveHasHeartBeat, bool simplified)
o2SetpointGasItem->setVisible(ppGraphs && prefs.show_ccr_setpoint);
ccrsensor1GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors);
ccrsensor2GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
ccrsensor3GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 1));
ccrsensor3GasItem->setVisible(ppGraphs && prefs.show_ccr_sensors && (currentdc->no_o2sensors > 2));
ocpo2GasItem->setVisible((currentdc->divemode == PSCR) && prefs.show_scr_ocpo2);
// No point to show the gradient factor if we're not showing the calculated ceiling that is derived from it
decoModelParameters->setVisible(prefs.calcceiling);