summaryrefslogtreecommitdiffstats
path: root/core/save-xml.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-09-10 08:43:54 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-11 07:19:57 -0700
commit15ef53fb805a96fec1dd9358ce58bcef6de9baab (patch)
tree537546f830b7f003e68928b1dcb38d28c52bf791 /core/save-xml.c
parent643085f992797c21717c08808ad99b5e34d1ef02 (diff)
downloadsubsurface-15ef53fb805a96fec1dd9358ce58bcef6de9baab.tar.gz
Do not save heartbeat to XML if it has not changed
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'core/save-xml.c')
-rw-r--r--core/save-xml.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/save-xml.c b/core/save-xml.c
index 7a12244f6..f7564f4b1 100644
--- a/core/save-xml.c
+++ b/core/save-xml.c
@@ -282,7 +282,10 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl
put_milli(b, " po2='", sample->setpoint.mbar, " bar'");
old->setpoint = sample->setpoint;
}
- show_index(b, sample->heartbeat, "heartbeat='", "'");
+ if (sample->heartbeat != old->heartbeat) {
+ show_index(b, sample->heartbeat, "heartbeat='", "'");
+ old->heartbeat = sample->heartbeat;
+ }
if (sample->bearing.degrees != old->bearing.degrees) {
show_index(b, sample->bearing.degrees, "bearing='", "'");
old->bearing.degrees = sample->bearing.degrees;