diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-12 20:37:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-12 20:37:32 -0700 |
commit | f4559ba9fa4610b56f27ffb20eb872908e987baf (patch) | |
tree | cab71b5fcf650d405f60c7dc72569497a90f9d95 /dive.c | |
parent | 73013911af7e6b26535bbff20ef9834d3cbbc71d (diff) | |
download | subsurface-f4559ba9fa4610b56f27ffb20eb872908e987baf.tar.gz |
Plot a sick kind of temperature curve
.. without the actual text, because I'm a "random plots that cannot
actually be interpreted" kind of guy.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -117,7 +117,6 @@ struct dive *fixup_dive(struct dive *dive) int maxdepth = 0, mintemp = 0; int lastdepth = 0; int lasttemp = 0; - temperature_t *redundant_temp = NULL; for (i = 0; i < dive->samples; i++) { struct sample *sample = dive->sample + i; @@ -141,17 +140,12 @@ struct dive *fixup_dive(struct dive *dive) /* * If we have consecutive identical * temperature readings, throw away - * the redundant ones. We care about - * the "edges" only. + * the redundant ones. */ - if (lasttemp == temp) { - if (redundant_temp) - redundant_temp->mkelvin = 0; - redundant_temp = &sample->temperature; - } else { - redundant_temp = NULL; + if (lasttemp == temp) + sample->temperature.mkelvin = 0; + else lasttemp = temp; - } if (!mintemp || temp < mintemp) mintemp = temp; |