mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:33:23 +00:00
git save format: Don't save redunant temperature sample data
The git sample loader will fill in temperature data from the previous
entry anyway, so saving repeated temperatures is just wasteful.
It turns out that commit 6cf3787a0e
("Remove code that zeroes out
duplicate oxygen sensor and temperature values") removed the explicit
redundant temperature removal in the dive fixup, which had hidden this
issue.
Cc: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3212bfdf99
commit
ddd0523bb4
1 changed files with 4 additions and 1 deletions
|
@ -213,7 +213,10 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl
|
|||
{
|
||||
put_format(b, " <sample time='%u:%02u min'", FRACTION(sample->time.seconds, 60));
|
||||
put_milli(b, " depth='", sample->depth.mm, " m'");
|
||||
put_temperature(b, sample->temperature, " temp='", " C'");
|
||||
if (sample->temperature.mkelvin && sample->temperature.mkelvin != old->temperature.mkelvin) {
|
||||
put_temperature(b, sample->temperature, " temp='", " C'");
|
||||
old->temperature = sample->temperature;
|
||||
}
|
||||
put_pressure(b, sample->cylinderpressure, " pressure='", " bar'");
|
||||
put_pressure(b, sample->o2cylinderpressure, " o2pressure='", " bar'");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue