mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
RBT - Add save/load in xml file support
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cfac25626b
commit
25f3038d40
2 changed files with 4 additions and 0 deletions
|
@ -936,6 +936,8 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
|
|||
return;
|
||||
if (MATCH("cns.sample", get_uint8, &sample->cns))
|
||||
return;
|
||||
if (MATCH("rbt.sample", sampletime, &sample->rbt))
|
||||
return;
|
||||
if (MATCH("sensor1.sample", double_to_o2pressure, &sample->o2sensor[0])) // CCR O2 sensor data
|
||||
return;
|
||||
if (MATCH("sensor2.sample", double_to_o2pressure, &sample->o2sensor[1]))
|
||||
|
|
|
@ -210,6 +210,8 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl
|
|||
put_format(b, " tts='%u:%02u min'", FRACTION(sample->tts.seconds, 60));
|
||||
old->tts = sample->tts;
|
||||
}
|
||||
if (sample->rbt.seconds)
|
||||
put_format(b, " rbt='%u:%02u min'", FRACTION(sample->rbt.seconds, 60));
|
||||
if (sample->in_deco != old->in_deco) {
|
||||
put_format(b, " in_deco='%d'", sample->in_deco ? 1 : 0);
|
||||
old->in_deco = sample->in_deco;
|
||||
|
|
Loading…
Reference in a new issue