mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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'");
|
put_milli(b, " po2='", sample->setpoint.mbar, " bar'");
|
||||||
old->setpoint = sample->setpoint;
|
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) {
|
if (sample->bearing.degrees != old->bearing.degrees) {
|
||||||
show_index(b, sample->bearing.degrees, "bearing='", "'");
|
show_index(b, sample->bearing.degrees, "bearing='", "'");
|
||||||
old->bearing.degrees = sample->bearing.degrees;
|
old->bearing.degrees = sample->bearing.degrees;
|
||||||
|
|
Loading…
Add table
Reference in a new issue