diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-01 12:49:32 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-06-01 13:09:26 -0700 |
commit | 7a77569019adde1a623229baf52f30a9345d0616 (patch) | |
tree | 6d138b26f73403fff4cbd9e45fddcb6a93be6371 /icons/moreinfo.png | |
parent | 36a3f649c5896b660ba3640a30b4ffc56d6ad679 (diff) | |
download | subsurface-7a77569019adde1a623229baf52f30a9345d0616.tar.gz |
Make sure all dive computer events are represented in the plot_info data
We could create a plot_info data that didn't contain all the time slots
for the events fromt he dive computer, which would terminally confuse
the plotting of the event profile widgets because it couldn't match up
the event with the dive plot data model.
So for example, in DiveEventItem::recalculatePos(), when the code tries
to figure out the spot in the data model, it could fail, and then try to
hide the event (because without the data model information it doesn't
know where it should go). But that hiding would then not match the
logic in DiveEventItem::shouldBeHidden(), and the event would end up
being shown in the upper left-hand corner of the profile after all.
The reason the plot_info data wouldn't contain the time slots is that
the slots are allocated primarily for the sample data, and then the
events would be added in between sample data in populate_plot_entries().
But since we'd only add the event pointer *between* samples, that would
mean that events after the last samples would not get plot-info points
allocated to them.
That issue was exacerbated by how we also truncate uninteresting samples
at the end when some dive computers end up giving a long stream
(possibly several minutes) of "at the surface" events before they
finally turn off logging.
This makes sure that we take the event timestamps into account for the
"maxtime" calculation, and also that we finish populating the plot_info
data with any final event timestamps.
Now all the events will have a matching plot_info entry.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'icons/moreinfo.png')
0 files changed, 0 insertions, 0 deletions