subsurface/profile-widget
Linus Torvalds 1e38d9239a Start cleaning up sensor indexing for multiple sensors
This is a very timid start at making us actually use multiple sensors
without the magical special case for just CCR oxygen tracking.

It mainly does:

 - turn the "sample->sensor" index into an array of two indexes, to
   match the pressures themselves.

 - get rid of dive->{oxygen_cylinder_index,diluent_cylinder_index},
   since a CCR dive should now simply set the sample->sensor[] indices
   correctly instead.

 - in a couple of places, start actually looping over the sensors rather
   than special-case the O2 case (although often the small "loops" are
   just unrolled, since it's just two cases.

but in many cases we still end up only covering the zero sensor case,
because the CCR O2 sensor code coverage was fairly limited.

It's entirely possible (even likely) that this migth break some existing
case: it tries to be a fairly direct ("stupid") translation of the old
code, but unlike the preparatory patch this does actually does change
some semantics.

For example, right now the git loader code assumes that if the git save
data contains a o2pressure entry, it just hardcodes the O2 sensor index
to 1.

In fact, one issue is going to simply be that our file formats do not
have that multiple sensor format, but instead had very clearly encoded
things as being the CCR O2 pressure sensor.

But this is hopefully close to usable, and I will need feedback (and
maybe test cases) from people who have existing CCR dives with pressure
data.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-21 16:33:19 -07:00
..
animationfunctions.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
animationfunctions.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
CMakeLists.txt Correctly handle SubsurfaceMobile 2016-01-08 08:04:24 -08:00
divecartesianaxis.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divecartesianaxis.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diveeventitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diveeventitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diveprofileitem.cpp Start cleaning up sensor indexing for multiple sensors 2017-07-21 16:33:19 -07:00
diveprofileitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.h code cleanup: remove unimplemented classes and structs 2017-06-16 05:31:41 +09:00
profilewidget2.cpp Start cleaning up sensor indexing for multiple sensors 2017-07-21 16:33:19 -07:00
profilewidget2.h code cleanup: remove unimplemented classes and structs 2017-06-16 05:31:41 +09:00
ruleritem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
ruleritem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
tankitem.cpp Start cleaning up sensor indexing for multiple sensors 2017-07-21 16:33:19 -07:00
tankitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00