From 25f3038d40edd7b88e06b2a0643878b30264f1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20Cu=C3=B1at?= Date: Wed, 22 Jul 2015 17:20:39 +0200 Subject: [PATCH] RBT - Add save/load in xml file support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Salvador Cuñat Signed-off-by: Dirk Hohndel --- parse-xml.c | 2 ++ save-xml.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/parse-xml.c b/parse-xml.c index d235f2e83..e63ed4fa2 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -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])) diff --git a/save-xml.c b/save-xml.c index 160b5fc84..00f4626d3 100644 --- a/save-xml.c +++ b/save-xml.c @@ -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;