There was also a function not being used that could be safely removed.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Structs and classes in C++ are basically the same thing and we want to
create a few zero-initialized values for some of them; Sadly, C++ doesn't
have the nice static struct initialization that C has.
One way to deal with that is to create a constructor and pass default
values to it, another is lambda-initialization, but we don't use C++11,
yet.
Since we initializate stuff on the constructor, we don't need to
re-initializate things again on the initialization list (which is also why
I removed the QStrings from the initialization lists, they are
automatically initialized to empty)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This now can create all the support libraries in armv7, but that isn't
sufficient for QtCreator which wants fat libraries with both armv7 and arm64 in
them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 7fac2a38b2.
Oops, that should have been dropped in the rebase before pushing the
changes. I did this instead in commit 99d1d8876e ("iOS build: create
ssrf-version.h by hand")
This is in the context of the iOS port and shouldn't impact any of the
other builds.
[Dirk Hohndel: refactored the iOS patches]
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's unclear why the build fails if we don't add the sample app files as
well.
[Dirk Hohndel: refactored the patches]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This now only builds all the prerequisits but not the actual Subsurface
binaries - that will be done with qmake (oh the irony) in a later commit.
[Dirk Hohndel: refactored the patches]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is hard coded in version.cmake for now. The intent is to go to 1.0 in
the first release version and to increment from there whenever we create
an update.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This brings the text closer to the current version of Subsurface-mobile,
but a lot more fine tuning will be required (and of course the images need
to be updated to reflect the current UI).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The "virial" form of the Z compression factor is of the form
Z = 1.0 + A*p + B*p^2 + C*p^3 + ..
and it's considered the "right" polynomial form to use. It happens to
also make for one constant less per gas (since the 1.0 can be added
later), and can be used to simplify the expression and avoid a few
floating point operations.
However, in order for that kind of expression simplification to make
sense, we need to make sure that we don't calculate the powers of the
pressure multiple times either, and that means we have to inline all the
actual calculations.
Our compiler options still mean that the generated code isn't optimal,
but that's a separate issue. And it is a lot better than it used to be.
Being clever about this does potentially make the code a tiny bit less
legible, but maybe that's not too bad for something that we'd expect to
not ever touch once we get it right.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With the current release candidate of Qt 5.6.0 we get into an infinite
recursion of the grid layout engine. This had happened before (prior to the 5.6
beta) and it appeared that setting the maximum width of the columns was
sufficient to fix this. But with the RC even that isn't sufficient, so now we
give up on having QML figure out the best possible column width and hard code
both preferred and maximum width to the same, predefined values. That's a total
shame, but at least now we can build against Qt 5.6 without infinite recursions
and crashes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Lubomir found better compressibility data for the pure gases that we
need for scuba, making the air table superfluous: we get good values
from just regular linear mixing of the Oxygen, Nitrogen and Helium
calculations.
Also, rather than using a quintic polynomial, a cubic one does
sufficiently well, making for smaller code and fewer coefficients.
And judging by the reactions from people on G+ (as well as just looking
at how good the fit is with the air data), this is all the right way to
do this, and this thus removes the Redlich-Kwong equation.
All-credit-goes-to: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
don't create a local PassiveNotification copy,
use the global show/hidePassiveNotification from
ApplicationWindow, now that it works
Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All error cases need to reset it as well.
And it's easier to reset it right after we come back from parse_file()
instead of trying to track all the exit cases after that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
.. and use a linear mix of them for arbitrary gas mixes.
For the special case of air, we continue to use the air-specific
polynomial.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This goes back to just doing air compressibility, but using the
least-squares quintic polynomial equation that Lubomir generated based
on the Wikipedia table for air at 300K in the 1-500 bar range.
We might be able to do similar things for mixed gases..
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The gas compressibility is such a specialized thing that I really prefer
having it separate.
This keeps Robert's Redlich-Kwong equation as-is, but let's experiment
with other models soon...
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And hide the notification either after 5 seconds or once we are done.
This requires an extension to the Kirigami components that isn't upstream,
yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>