diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 12:14:33 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-09-15 16:29:00 +0200 |
commit | e94af2c0b7ce0dd0e61e25b717829543120c4d33 (patch) | |
tree | 6a34d55a24935646bbc54e16000beef28113d239 /core/profile.c | |
parent | 41bbae31f53df0b5d946a11f5fe8cc4b8e0f7a41 (diff) | |
download | subsurface-e94af2c0b7ce0dd0e61e25b717829543120c4d33.tar.gz |
Properly clear sensor pressure data for synthetic plotinfo entries
We only cleared the first sensor data when we created new synthetic plot
info entries, because we only used to have one (well, we had the o2
data, but apparently nobody ever noticed that it didn't get properly
interpolated, probably because people who have CCR dives with o2
pressures are few, and the pressure drops are gradual anyway).
Clear all the pressure data, so that the interpolation code doesn't
think we have some existing real sensor data for the plot info entries
in between proper sample entries.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c index af9ebff28..4ff27fcd7 100644 --- a/core/profile.c +++ b/core/profile.c @@ -494,7 +494,7 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer entry->sec = _time; \ entry->depth = _depth; \ entry->running_sum = (entry - 1)->running_sum + (_time - (entry - 1)->sec) * (_depth + (entry - 1)->depth) / 2; \ - SENSOR_PRESSURE(entry, 0) = 0; \ + memset(entry->pressure, 0, sizeof(entry->pressure)); \ entry->sac = _sac; \ entry++; \ idx++ |