mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add CNS and pO2 tracking in the samples
This adds the new members to the sample structure and fills them from supported dive computers (Uemis SDA and OSTC / Shearwater Predator, assuming you have libdivecomputer 0.3). Save relvant values of this to the XML file and load it back. Handle the new fields when merging dives. At this stage we don't DO anything with this, all we do is extract them from the dive computer, save them to the XML file and load them back. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a72597189d
commit
9d80e7bfe4
6 changed files with 40 additions and 2 deletions
|
@ -185,6 +185,18 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
|||
printf("%02X", ((unsigned char *) value.vendor.data)[i]);
|
||||
printf("</vendor>\n");
|
||||
break;
|
||||
#if DC_VERSION_CHECK(0, 3, 0)
|
||||
case DC_SAMPLE_SETPOINT:
|
||||
/* for us a setpoint means constant pO2 from here */
|
||||
sample->po2 = value.setpoint * 1000 + 0.5;
|
||||
break;
|
||||
case DC_SAMPLE_PPO2:
|
||||
sample->po2 = value.ppo2 * 1000 + 0.5;
|
||||
break;
|
||||
case DC_SAMPLE_CNS:
|
||||
sample->cns = value.cns * 100 + 0.5;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue