Commit graph

10770 commits

Author SHA1 Message Date
Anton Lundin
4ef90638d4 android: Remove obsolete comment
Since c78e4f we build the mobile and desktop versions with different
package id's.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:34:15 -07:00
Anton Lundin
2aa9841213 android: Prioritize newer Qt version if found
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:34:00 -07:00
Anton Lundin
9443b0b86c android: Use a ndk toolchain matching sdk version
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:33:32 -07:00
Anton Lundin
93355821a8 android: Update min sdk version for desktop to.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:33:05 -07:00
Anton Lundin
f28dfce50f android: Update to latest NDK
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:49 -07:00
Anton Lundin
f3cde0357f android: Correct README
We don't depend on Qt5.5, we depend on Qt for android.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:24 -07:00
Anton Lundin
4f850e2aa5 Build Subsurface c++ as c++11 code
With Qt 5.7, they started to require c++11 support, and in 5.6.1 some
nullptr's showed up in QtAndroidExtras/qandroidfunctions.h, so now we
need to compile our c++ code with c++11 support in our compiler.

As Thiago pointed out, this effectively "downgrades" GCC 6 from c++14
support to c++11.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:10 -07:00
Dirk Hohndel
4d4faecd67 Allow building Android package against Qt 5.7
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-22 13:25:26 -07:00
Dirk Hohndel
2c60e87b09 Qt 5.7 requires C++11
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-22 13:23:10 -07:00
Dirk Hohndel
54b97ec848 Qt 5.7 requires at least Android SdkVersion 16
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-22 13:22:06 -07:00
Marco Martin
4ec1a94dee make sure the ListView is the last element
since the contentItem is the default property of
ScrollablePage, putting another Item after it will change
contentItem with that one, in this case the Label

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-21 09:52:34 -07:00
Dirk Hohndel
cb20da7de3 Avoid unused argument warnings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-20 18:44:16 -07:00
Willem Ferguson
9803d7acde User manual update: Subsurface-mobile
Subsurface user manual update: Subsurface-mobile

Provide text for the use of Subsurface-mobile to collect
GPS positions, upload these and sync the stored GPS positions
with dives in the dive list. Two images added.

This is in addition to documentation for the Companion App.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>

From f2062208b1cc76743280428227e8a31e51732dc9 Mon Sep 17 00:00:00 2001
From: Willem Ferguson <willemferguson@zoology.up.ac.za>
Date: Sun, 19 Jun 2016 14:29:19 +0200
Subject: [PATCH 4/4] Subsurface user manual update: Subsurface-mobile

Provide text for the use of Subsurface-mobile to collect
GPS positions, upload these and sync the stored GPS positions
with dives in the dive list.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-20 18:40:00 -07:00
Miika Turkia
4ccfda65e7 Tuning the mobile-manual
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-20 18:39:54 -07:00
Miika Turkia
58690f3249 Enable creation of mobile-manual
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-20 18:39:49 -07:00
Linus Torvalds
d918289a04 Preferentially use existing device ID when setting serial number
We have two different models for setting the deviceid associated with a
dive computer: either take the value from the libdivecomputer 'devinfo'
field (from the DC_EVENT_DEVINFO event), or generate the device ID by
just hashing the serial number string.

The one thing we do *not* want to have, is to use both methods, so that
the same device generates different device IDs.  Because then we'll
think we have two different dive computers even though they are one and
the same.

Usually, this is not an issue, because libdivecomputer either sends the
DEVINFO event or gives us the serial number string, and we'll always
just pick one or the other.

However, in the case of at least the Suunto EON Steel, I intentionally
did *not* send the DC_EVENT_DEVINFO event, because it gives no useful
information.  We used the serial number string to generate a device ID,
and everything was fine.

However, in commit d40cdb4755ee ("Add the devinfo event") in the
libdivecomputer tree, Jeff started generating those DC_EVENT_DEVINFO
events for the EON Steel too, and suddenly subsurface would start using
a device ID based on that instead.

The situation is inherently ambiguous - for the EON Steel, we want to
use the hash of the serial number (because that is what we've
historically done), but other dive computers might want to use the
DEVINFO data (because that is what _those_ backends have historically
done, even if they might also implement the new serial string model).

This commit makes subsurface resolve this ambiguity by simply preferring
whatever previous device ID it has associated with that particular
serial number string.  If you have no previous device IDs, it doesn't
matter which one you pick.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-20 18:39:21 -07:00
Miika Turkia
41e5f23002 Update required packages on INSTALL file
libgit2-dev is no longer needed as we compile it from sources.
Also add qtpositioning5-dev for Debian as dependencies there are
apparently slightly different than on Ubuntu.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-18 11:22:56 -07:00
Willem Ferguson
c9081e5975 Corrections to user manual
Replace one icon and correct text to show an image.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-18 11:22:56 -07:00
Willem Ferguson
95b997c469 User Manual update
Update section of user manual dealing with searching the manual
and following links in the manual.
Repaired one omage, added a second

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-18 11:22:56 -07:00
Willem Ferguson
9633a676d9 Update to mobile user manual
Include text on obtaining PIN within Subsurface-mobile.
Replace two images

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-18 11:22:56 -07:00
Willem Ferguson
f71a1b88a6 Update to user manual for Subsurface-mobile with ten additional images.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-18 11:22:56 -07:00
Dirk Hohndel
8d83edc48a QML UI: correctly check cloud verification status
Oops. That's embarrassing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:23:46 -07:00
Dirk Hohndel
6cf100f1cc Avoid crash with empty command line argument
It appears on iOS we can get a command line argument of "" which would
crash Subsurface-mobile on startup.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:10:39 -07:00
Dirk Hohndel
24bd2eab43 iOS build: add another dependency to dummy.qml
This way the required plugins get automagically added to the bundle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:07:37 -07:00
Dirk Hohndel
10833e32ed iOS build: use the Qt version that is available
Simply have the Qt link in packagin/ios point to whatever Qt version
you want to build against and the script picks the right one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17 04:06:51 -07:00
Dirk Hohndel
da052967c2 Grr. Fix. Typo.
I never push things without compile testing. Never.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14 12:15:03 -07:00
Robert C. Helling
b2f327f6e0 QML UI: Not giving wrap info improves dive details on narrow screens
This prevents label text from overlapping.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14 12:05:20 -07:00
Robert C. Helling
fc213066f8 Only setpoint changes with non-zero SP indicate a CCR dive
There might be some spurious setpoint changes at t=0 without
an actual value (I have no idea where those come from). In
any case, those do not indicate that the dive is a CCR dive.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14 12:04:36 -07:00
Dirk Hohndel
0d986b9cfd QML UI: show an empty dive list with explanation
If the credentials are valid we should show the dive list. If there are no
dives, simply say so.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14 12:03:19 -07:00
Dirk Hohndel
3f26de826a QML UI: explain that the user can create a new cloud storage account
Fixes: #1073

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13 22:35:22 -07:00
Robert C. Helling
783844eb3d Set date and time when replanning a dive
Otherwise we pretend the dive is now.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13 22:17:49 -07:00
Dirk Hohndel
07512cb2c8 QML UI: allow entering the cloud PIN on the mobile UI
Now the user doesn't need to do this on the desktop app anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13 16:42:36 -07:00
Dirk Hohndel
5fa965df54 QML UI: prepare to enter the cloud PIN on mobile UI
This just creates the properties to connect QML and C++ code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13 16:41:26 -07:00
Dirk Hohndel
d2f9803883 QML UI: serialize checking credentials
If we run the backend to verify credentials without waiting for it to
finish, the redirect might happen before we know if the credentials are
invalid, unverified or verified - which will cause us to give the wrong
information to the user.

Yes, this additional wait is annoying, but I can't come up with a better
way to do this and avoid incorrect information. At least the UI isn't hung
while we wait.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13 15:25:17 -07:00
Dirk Hohndel
f7daadb1cd QML UI: don't proceed unless cloud credentials are verified
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 18:05:33 -07:00
Robert C. Helling
1df085240d Remove strange whitespace on right of divelist
There was a column of whitespace in the divelist that looked strange.
It was there so a trash can icon can appear. Now the trashcan overlaps
with the item.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 15:49:17 -07:00
Dirk Hohndel
22170d3991 QML UI: add debug output for dive edit save button
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 14:49:40 -07:00
Dirk Hohndel
13c55e2b26 Fix typo
Duh.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 13:41:55 -07:00
Dirk Hohndel
2755e64cea Don't quit when hitting the back button on iOS
This should finally fix this problem.
Famous last words.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 12:12:37 -07:00
Dirk Hohndel
f2e03022fa QML UI: disable GPS functionality on iOS
I still haven't figured out how to make GPS work on iOS. So let's not
pretend this works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 12:09:49 -07:00
Dirk Hohndel
72523ff0df QML UI: somewhat improve GPS list rendering
At least now it's readable, but on the flipside there's now this odd
margin around the entries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 07:32:07 -07:00
Dirk Hohndel
92e06007cc QML UI: update for latest Kirigami
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12 07:31:53 -07:00
Dirk Hohndel
818031e604 updated build scripts for Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11 10:37:30 -07:00
Dirk Hohndel
c580122727 Remove unused variable
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11 10:32:00 -07:00
Linus Torvalds
710d47a2da Make sure dive computer model is proper malloc'ed allocation
Reported-and-tested-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11 10:29:31 -07:00
Robert C. Helling
3870916ae2 Fix logic for presaturation
There were two problems in the calculation of tissue pre-
saturation from previous dives: We added the surface interval after
the dive rather than before and when also took dives into accout
that were in the future of the dive considerd.

Reported-by: Timothy Massey
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11 10:28:04 -07:00
Linus Torvalds
7a77569019 Make sure all dive computer events are represented in the plot_info data
We could create a plot_info data that didn't contain all the time slots
for the events fromt he dive computer, which would terminally confuse
the plotting of the event profile widgets because it couldn't match up
the event with the dive plot data model.

So for example, in DiveEventItem::recalculatePos(), when the code tries
to figure out the spot in the data model, it could fail, and then try to
hide the event (because without the data model information it doesn't
know where it should go).  But that hiding would then not match the
logic in DiveEventItem::shouldBeHidden(), and the event would end up
being shown in the upper left-hand corner of the profile after all.

The reason the plot_info data wouldn't contain the time slots is that
the slots are allocated primarily for the sample data, and then the
events would be added in between sample data in populate_plot_entries().

But since we'd only add the event pointer *between* samples, that would
mean that events after the last samples would not get plot-info points
allocated to them.

That issue was exacerbated by how we also truncate uninteresting samples
at the end when some dive computers end up giving a long stream
(possibly several minutes) of "at the surface" events before they
finally turn off logging.

This makes sure that we take the event timestamps into account for the
"maxtime" calculation, and also that we finish populating the plot_info
data with any final event timestamps.

Now all the events will have a matching plot_info entry.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-01 13:09:26 -07:00
Linus Torvalds
36a3f649c5 Don't show surface events at the beginning or end of the dive
That's just annoying and pointless.  So we arbitrarily say that surface
events within the first and last 30s of the dive are suppressed.

But we now do show them in the middle, in case the sampling rate is too
low, and the profile itself doesn't show that we got to the surface.

These heuristics still needs tweaking - if the profile already shows
that we're at the surface, then we should probably suppress the event
triangle.

But in the meantime this at least gets rid of the truly pointless cases.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-01 13:08:45 -07:00
Linus Torvalds
5ea16c0bab Don't ignore surface events in xml parsing
I missed the fact that not only did we skip importing surface events
from the dive computer, we had also made our xml parser ignore them when
loading an xml file.  All part of our historical "let's ignore surface
events because dive computers are being very annoying about it".

Signed-off-by: Linus Torvalds <torvalds@linux-foundtion.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-01 13:08:22 -07:00
Linus Torvalds
7bbd8cc974 Don't ignore surface events from libdivecomputer
There are cases where we actually want to keep them, as exemplified by
this situation from Richard Yorke:

  "I have just come across a situation when ignoring the surface marker
   is a disadvantage.  I have just had a problem with my BC feed
   seeping, slowly filling my BC and as I control my buoyancy on the
   bottom using the air in my drysuit, I did not notice, so that when I
   came to ascend the expanding air in my BC caused a loss of control.

   Fortunately not from a great depth and no untoward consequences.
   However, the Subsurface profile only shows me rising to 4m and
   descending to 5.5m for my safety stop.  However I actually broke the
   surface and descented to 5.5 but the frequency of recording depth was
   not fast enough to show this as it was so brief"

so remove the code that ignores the surface events entirely.

I think we'll have to come up with some smarter filtering model for
showing them, but that is predicated on getting these events to come
through in the first place.

Reported-by: Richard Yorke <yorke.richard@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-31 10:16:20 -07:00