mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
41bbae31f5
commit
e94af2c0b7
1 changed files with 1 additions and 1 deletions
|
@ -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++
|
||||
|
|
Loading…
Add table
Reference in a new issue