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:
Linus Torvalds 2015-01-02 21:29:40 -08:00 committed by Dirk Hohndel
parent 3212bfdf99
commit ddd0523bb4

View file

@ -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'");