subsurface/qt-models
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
..
cleanertablemodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cleanertablemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
CMakeLists.txt Add a messageHandler to take care of qDebug & friends on QML 2017-06-11 13:55:41 -07:00
completionmodels.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
completionmodels.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cylindermodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cylindermodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputerextradatamodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputerextradatamodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputermodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputermodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
diveimportedmodel.cpp DiveImportedModel: be consistent with last = -1 2017-07-09 16:04:31 -07:00
diveimportedmodel.h QML UI: clear the previous list when downloading 2017-06-16 01:22:44 -07:00
divelistmodel.cpp QML UI: add downloaded dives to dive list 2017-05-28 11:54:33 -07:00
divelistmodel.h QML UI: add downloaded dives to dive list 2017-05-28 11:54:33 -07:00
divelocationmodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divelocationmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divepicturemodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divepicturemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
diveplannermodel.cpp Adopt planner state caching to new struct 2017-05-26 15:44:36 -07:00
diveplannermodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
diveplotdatamodel.cpp Start cleaning up sensor indexing for multiple sensors 2017-07-21 16:33:19 -07:00
diveplotdatamodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divesitepicturesmodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divesitepicturesmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divetripmodel.cpp Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
divetripmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
filtermodels.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
filtermodels.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
gpslistmodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
gpslistmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
messagehandlermodel.cpp Android: write appLog to file 2017-07-09 17:40:29 -07:00
messagehandlermodel.h Make message handler write to console as well 2017-06-11 13:55:41 -07:00
models.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
models.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
ssrfsortfilterproxymodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
ssrfsortfilterproxymodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
tankinfomodel.cpp tankinfomodel.cpp: clamp row index to [0 - MAX_TANK_INFO] 2017-06-15 14:48:49 -07:00
tankinfomodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
treemodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
treemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightmodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weigthsysteminfomodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weigthsysteminfomodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
yearlystatisticsmodel.cpp Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
yearlystatisticsmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00