summaryrefslogtreecommitdiffstats
path: root/core/save-xml.c
diff options
context:
space:
mode:
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;