diff options
-rw-r--r-- | core/save-xml.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/save-xml.c b/core/save-xml.c index 19b4e79b7..7a12244f6 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -283,7 +283,10 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl old->setpoint = sample->setpoint; } show_index(b, sample->heartbeat, "heartbeat='", "'"); - show_index(b, sample->bearing.degrees, "bearing='", "'"); + if (sample->bearing.degrees != old->bearing.degrees) { + show_index(b, sample->bearing.degrees, "bearing='", "'"); + old->bearing.degrees = sample->bearing.degrees; + } put_format(b, " />\n"); } |