aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveeventitem.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-07 08:31:16 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-10 15:02:53 -0800
commitcafda9530c050798497c66844b041ee007a6ad19 (patch)
tree67a63a96c8869371361d390fb75d8f78c9074cb8 /qt-ui/profile/diveeventitem.cpp
parent8b9cf5d0920dcf0d5a6eb613ef2024d600e3df06 (diff)
downloadsubsurface-cafda9530c050798497c66844b041ee007a6ad19.tar.gz
Deal with setpoints in samples when switching a dive from CCR to OC
For some dive computers (at least the Shearwater Predator, I haven't checked if there are others), libdivecomputer used to return setpoint values in each sample even if the dive computer was in OC mode. Those setpoint values are redundant and confuse our algorithm that tries to detect if a dive is OC or CCR. So when manually switching from CCR to OC we make sure that there are no setpoint values in the samples. This is a destructive change - if the user switches to OC by mistake and accepts that change, even when switching back to CCR the setpoint changes during the dive are lost. I rewrote the code dealing with the events as it was rather confused. Looping over the events that way didn't make any sense since get_next_event() is guaranteed to give you the first (if any) event of the requested name. See #826 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveeventitem.cpp')
0 files changed, 0 insertions, 0 deletions