Commit graph

8973 commits

Author SHA1 Message Date
Anton Lundin
37953d163e Enable the configuration of more OSTC3 settings
This enables enables you to configure a couple of new settings in the
OSTC3 devices.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:20 -07:00
Anton Lundin
c69d5619ce Remove getters and setters in DeviceDetails
The DeviceDetails class is just a storage container for passing values
back and forth between backend and ui code. The different names between
the setters and getters just made it a pain to write nice macros and
keeping the two ends in sync, so this just removes the setters and
getters in favor of having the members public.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:26:06 -07:00
Tomaz Canabrava
6944084653 Make it possible to use Subsurface in height=768
Small, Small screen. why are you still used today?

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 15:25:44 -07:00
Rick Walsh
e2dbd3fcae VPM-B: Add 1 percent conservatism to pass tests
Subsurface appears to produce marginally less conservative plans than our
benchmarks.  Introduce 1% additional conservatism.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 11:09:24 -07:00
Robert C. Helling
40122e4233 Prevent tests from hanging when offline
From 31e324797c06d366f49db453a67a119819ca8012 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <helling@atdotde.de>
Date: Wed, 2 Sep 2015 17:28:12 +0200
Subject: [PATCH] Test that there is a dive

so that the TestGitStorage does not hang when offline.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-02 09:11:20 -07:00
Dirk Hohndel
181d5c5db9 Cmake: turn on printing by default
As we get closer to the 4.5 release we should try to make sure we build
with printing enabled everywhere and just turn it off if we no it's not
supported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-01 09:52:52 -07:00
Guillaume GARDET
b2fd98dc1b Documentation: update french translation of user-manual
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-01 06:11:36 -07:00
Dirk Hohndel
a1c023bee0 Event filters need to tell the caller if they took the event
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 19:24:36 -07:00
Dirk Hohndel
5670b5fedd Silly compile fix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 19:24:23 -07:00
Dirk Hohndel
8afd5e8bbc A few more version number updates
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:49:13 -07:00
Tomaz Canabrava
2da439f34c Correctly refresh dive site list
And also show a warning to the user saying that that
action is non-cancelable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:52 -07:00
Tomaz Canabrava
1ef20ee5d8 Merge the dive sites selected.
Wee. :)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:43 -07:00
Tomaz Canabrava
e36e4d1faa UI code to merge dive sites
Get the Qt data structures and convert to something
that we can use in our C - core.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:43:09 -07:00
Tomaz Canabrava
560426bf82 Offer the option to merge dive sites.
Almost finishing. :)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:56 -07:00
Tomaz Canabrava
b52b95f3ec Show the correct data on the Dive Site List
We where showing the UID, wich didn't made sense.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:32 -07:00
Tomaz Canabrava
a3d6098c8c Display dive sites with same gps as the current
So we can merge them later - currently we are showing
only the ID, ugly - fixing next.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:42:15 -07:00
Tomaz Canabrava
dcda950202 Fix recursive stack-overflow
Only call this when needed, if there's no function set
as callback, always return true.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:41:47 -07:00
Tomaz Canabrava
71e366a6e4 Add function to filter same-gps dive sites
This should be userfull to show dive sites that are
mergeable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:41:32 -07:00
Tomaz Canabrava
ab32295f89 Add a new model: SsrfFilterProxyModel
Add a new Model, it's the QSortFilterProxyModel that accepts
functions to filter / sort. so instead of creating a new class
for each different sorting (overkill), now we can just create
a function and pass to this class.  I'll rework the filtering
system of subsurface to use this - in the meantime I've created
this to ease the creation of another filter: the dive sites
by gps coordinates.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:41:14 -07:00
Tomaz Canabrava
5db6d41598 Widget to show other dive sites at the same coordinates
Add a new widget on the dive site management view to
display all other dive sites at the same coordinates.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 18:37:45 -07:00
Grace Karanja
7115f6e237 QML UI: Documentation: Introduce the app
Basic documentation on how to log into the app and how to load dives,
view them, edit and save changes.

[Dirk Hohndel: heavily edited commit to remove all the unintended changes]

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:59:20 -07:00
Grace Karanja
56771159a8 QML UI: Show log correctly
Correctly show the log messages. The log window will display all
messages emitted by the QML Manager class.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
cd28082c39 QML UI: Fix error when closing the log window
When closing the log window, do not try to save the changes. This
should only be done when closing the DiveDetails.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
89c7e4cd67 QML UI: Show message when loading dives
Show a message at the start of fetching dives, so that the user knows
whats going on.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
9e53b3082c QML UI: Add ViewLog menu
Add a menu entry to show the application log.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ee13c5c282 QML UI: Add QML Log viewer
Add the ability to preview the application log in QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ab7db605e5 QML UI: Move top bar to its own file
Move the QML top panel to its own file, so that it can be used in
other files.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
390c10bb08 QML UI: Remove unneeded MobileDive class
The MobileDive class in divelistmodel.h is a duplication of the
Dive class in templatelayout.h. This patch moves the Dive to
the qthelper file.

[Dirk Hohndel: merged with upstream master - let's hope I didn't
               mess anything up]

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:47:48 -07:00
Grace Karanja
46cfe003f3 QML UI: Add Android build instructions
Add instructions on how to build the android version to the INSTALL
file.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
5a7dbf0225 QML UI: Use AddDive instead of clear dive
No need to clear the dives when adding a new one.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
a734a2ee19 QML UI: Dynamically change button text
Dynamically change the text of the show/hide profile button.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
3d5ad19888 QML UI: Add button to hide dive profile
Allow toggling of dive profile visibility

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
1925b3d012 QML UI: Remove clearDetails() function in DiveList.qml
This function is not needed, as we will move all of the logic to
C++.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
a3bdf49b84 QML UI: Clear divelist model before starting new dive
When user clicks on AddDive, we should clear the model.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
8d03d26480 QML UI: Start Add Dive feature
Start working on the add dive feature, to enable the user add a
new dive using the mobile UI.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Robert C. Helling
10d8a625d0 Adopt expected times in TestPlan
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:19:10 -07:00
Robert C. Helling
e32896c2bc Introduce double depth_to_bar()
as it leads to significant cleanup.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:18:40 -07:00
Robert C. Helling
bd8126a709 Calculate ceiling only when it is needed
So far, add_segment() returned a tissue tolerance (i.e. ceiling)
computed just in its return statement. This tissue_tolerance
needed to be dragged around until it was needed or be dropped
if not needed at all.

As for VPM-B, this ceiling computation is a bit expensive, this patch
calls the computation function tissue_tolerance_calc() when the
value is actually needed and not before.

This changes the signature of some functions.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:17:39 -07:00
Robert C. Helling
d9306125d9 Do the Boyle compensation when the gradient is needed
and not some time before and store the result in a global variable.

This stores only the bottom gradients and computes the Boyle compensation
when computing the allowed ambient pressure.

As the Boyle compensation needs a reference ambient pressure, to find the ceiling,
we have to iterate this computation until the reference pressure is close enough to
the ceiling.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:15:19 -07:00
Robert C. Helling
3a7109e44e Changed qInfo() to qDebug()
... as the former was introduced only in Qt 5.5 in order to make the
test build also with 5.4

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:13:43 -07:00
Anton Lundin
74ecb924f4 Support multiple o2 sensor values from libdc
libdivecomputer might call us with DC_SAMPLE_PPO2 multiple times, which
means multiple sensors.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:13:06 -07:00
Anton Lundin
0cf9e0570d Store DC_SAMPLE_PPO2 as a o2 sensor
DC_SAMPLE_PPO2 represents a known ppO2, and not a setpoint.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:12:53 -07:00
Anton Lundin
70d9297e3a Be compatible with libgit2 0.22 again
In libgit2 0.22 tree_flags was called flags.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:12:37 -07:00
Anton Lundin
b7038e4bec Remove unneeded includes
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 15:12:18 -07:00
Dirk Hohndel
332bde9c86 Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 10:44:34 -07:00
Dirk Hohndel
3bcb634e06 Remove about window have for Beta releases
Simply tag the beta versions correctly and none of this is needed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31 10:36:49 -07:00
Rick Walsh
2c4ae23ccc VPM-B: Get rid of ugly blips in ceiling
A real ceiling is the ceiling calculated when the ambient pressure is at the
ceiling.  As such, the Boyle's law compensation should be done against the
ambient pressure at the ceiling.  Instead of doing an iterative calculation,
take the lesser ambient pressure of the ceiling of the previous sample, and the
depth of the current sample.

This approach gets rid of "blips" in the calculated ceiling due to a step in
Boyle's law compensation during ascent.  In limited testing, it also appears to
avoid creating a ceiling deeper than the calculated plan in most cases.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30 16:55:36 -07:00
Rick Walsh
9238a7f0df Profile.c: Fix stepping through loop between sample points
If adjacent samples at times t0 and t1 are greater than time_stepsize apart,
this for loop steps through the time between samples to calculate tissue
tolerance incrementally at each intermediate time, j, (and interpolated depth).

If the difference between t1 and t0 is not a multiple of time_stepsize,
immediately before the final increment time_stepsize needs to be reduced to
t1 - j so that j = t1 in the final increment.

This is necessary when:
	t1 - j < time_stepsize	(i.e. we are about to start the final
				increment, and time_stepsize needs to be
				reduced), and
	j < t1			(i.e. we didn't just do the final increment -
				without this condition time_stepsize would be
				set to zero, leading to an infinite loop)

Previously, the check was (j - t0 < time_stepsize), which always returns false.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30 16:55:17 -07:00
Dirk Hohndel
6d7faa106f Add test case for multi line dive notes merging
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30 13:00:32 -07:00
Dirk Hohndel
1b37e0f1a4 Add test for dive site duplication bug
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-30 10:32:38 -07:00