mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Do not save heartbeat to XML if it has not changed
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
643085f992
commit
15ef53fb80
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue