Change 'sensor7' to 'dc_supplied_ppo2' for the dive computer supplied value.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2025-01-20 10:00:23 +13:00
parent c685f3d6a1
commit 71ebee8ab6
4 changed files with 4 additions and 4 deletions

View file

@ -585,7 +585,7 @@ static void parse_sample_keyvalue(void *_sample, const char *key, const std::str
sample->o2sensor[5] = get_o2pressure(value.c_str());
return;
}
if (!strcmp(key, "sensor7")) {
if (!strcmp(key, "dc_supplied_ppo2")) {
sample->o2sensor[6] = get_o2pressure(value.c_str());
return;
}

View file

@ -931,7 +931,7 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
return;
if (MATCH("sensor6.sample", double_to_o2pressure, &sample->o2sensor[5])) // up to 6 CCR sensors
return;
if (MATCH("sensor7.sample", double_to_o2pressure, &sample->o2sensor[6])) // the dive computer calculated ppO2
if (MATCH("dc_supplied_ppo2.sample", double_to_o2pressure, &sample->o2sensor[6])) // the dive computer calculated ppO2
return;
if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint))
return;

View file

@ -343,7 +343,7 @@ static void save_sample(struct membuffer *b, const struct sample &sample, struct
}
if ((sample.o2sensor[6].mbar) && (sample.o2sensor[6].mbar != old.o2sensor[6].mbar)) {
put_milli(b, " sensor7=", sample.o2sensor[6].mbar, "bar");
put_milli(b, " dc_supplied_ppo2=", sample.o2sensor[6].mbar, "bar");
old.o2sensor[6] = sample.o2sensor[6];
}

View file

@ -328,7 +328,7 @@ static void save_sample(struct membuffer *b, const struct sample &sample, struct
}
if ((sample.o2sensor[6].mbar) && (sample.o2sensor[6].mbar != old.o2sensor[6].mbar)) {
put_milli(b, " sensor7='", sample.o2sensor[6].mbar, " bar'");
put_milli(b, " dc_supplied_ppo2='", sample.o2sensor[6].mbar, " bar'");
old.o2sensor[6] = sample.o2sensor[6];
}