Commit graph

9890 commits

Author SHA1 Message Date
Dirk Hohndel
6051bf9f89 Android build: we should build Subsurface-mobile by default
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 17:38:55 -08:00
Rick Walsh
0aecb12ab1 Subsurface-mobile: capitalization of app name
We call the app Subsurface-mobile most of the time, let's do so for the app
name too

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>

../android-mobile/res/drawable-xhdpi/subsurface_mobile_splash.9.png
../android-mobile/res/drawable-xxhdpi/subsurface_mobile_splash.9.png
../android-mobile/res/drawable-xxxhdpi/subsurface_mobile_splash.9.png
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 17:30:54 -08:00
Dirk Hohndel
f3065230a3 QML UI: add information about build time / run time Qt version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 17:29:46 -08:00
Rick Walsh
0624e882e4 Subsurface-mobile: Add 9-patch splash images
Adds 9-patch splash images, so that will not be distorted on different sized
and oriented displays.

Created with guidance from
https://software.intel.com/en-us/xdk/articles/android-splash-screens-using-
nine-patch-png

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 09:54:32 -08:00
Dirk Hohndel
7e2898dfde QML UI: scale profile to allow for some visible separation
That small margin makes things look much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 09:52:27 -08:00
Dirk Hohndel
87f1301f50 QML UI: draw the profile anti aliased
This seems to look much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 09:51:34 -08:00
Dirk Hohndel
ef653b41f5 QML UI: obtain a reasonable margin from QML
This will be used later in the positioning of the profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 09:50:47 -08:00
Dirk Hohndel
9df3835035 QML-UI: switch profile widget into print mode
We don't need any of the interactive features. Additionally this allows us to
easily ask for slightly smaller fonts.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 07:15:52 -08:00
Miika Turkia
bcdd5645a6 Add splash screen for android-mobile
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-28 14:03:48 -08:00
Miika Turkia
1f4d02a861 Improve group information on USB device
As the group can be something else than dialout on some systems, mention
this on user manual.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-28 08:28:15 -08:00
Dirk Hohndel
c7c9fb0bb0 Git storage: be more careful when checking if this SHA is already loaded
In commit 8c1cc4524d ("Don't reload identical data") I got a little
carried away. Before comparing SHAs we need to make sure that
a) this is a git repository at all
b) we have an actual SHA before we claim to have the data loaded

Reported-by: Paul-Erik Törrönen <poltsi@777-team.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-28 08:21:03 -08:00
Stephen Hemminger
04054c0429 update Debian version
The current code base depends on qtlocation5-dev which is not
in Debian 8 (Jessie). It requires Debian testing (Stretch).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 21:31:13 -08:00
Stephen Hemminger
113a421228 ftdi: fix memory leak on error
Found by cppcheck. Minor memory leak if usb_reset fails

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 21:31:13 -08:00
Stephen Hemminger
7a42215067 dive: paren error in set point handling
This probably is a serious bug, found by cppcheck.
Original code had paren's in probably the wrong place!

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 21:31:13 -08:00
Dirk Hohndel
fcc615a497 QML UI: try to remove two binding loops
Let's face it. I have no idea what I'm doing here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:28:08 -08:00
Dirk Hohndel
81999e4667 QML UI: add debug output for echoMode
For some users by default the password characters aren't hidden. Maybe the
debugging output will help us understand what's going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:20:36 -08:00
Dirk Hohndel
97c23d6ee5 QML UI: cloud credential input: use text input hints
We shouldn't auto-capitalize and the text should only be email address
characters.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:19:51 -08:00
Dirk Hohndel
bbcc6fb3c2 QML UI: if remote is same as local cache, don't load / process remote
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
8c1cc4524d Don't reload identical data
If we already have the same SHA loaded and no changes have been made to the
dive list then there is no point in loading the dives again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
bc200c3089 Cloud storage: check the top commit without loading dives
This way we can check if the local cache is in sync with the remote without
always triggering a load of the dives from git.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
739d7d74e7 QML UI: load from cache before trying to sync with the cloud server
This is a simple way to deal with a "no network" situation. But this isn't
ideal, yet, if there is a slow network as the dive list will be reset again
once the sync from the cloud finishes. So there is some more thought needed to
make this work "mostly as expected".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
83bd46cf79 Add option to not check the remote when loading from git storage
This way we can first load from cache and then update from the network in the
background.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:33 -08:00
Dirk Hohndel
3a670f8c3b QML UI: don't show "1 of n" for multiple dive computers
This is actually not a change in the QML - it just conditionally compiles out
the code when building Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 10:06:32 -08:00
Miika Turkia
de76cb3ebb Fix UDCF import time unit in timedepthmode
The timedepthmode specifies the time in seconds when using si units,
otherwise minutes. This patch implements this support.

Fixes #981

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 23:11:18 -08:00
Dirk Hohndel
99a5a743c4 QML UI: change the way we extract input data from dive edit
Instead of doing the silly "onEditingFinished" we get the strings from the QML
components at the time we commit the change. Much more logical, much more
straight forward, no issues with the TextArea not having an onEditingFinished
signal.

This still has a few open todos: the temperatures aren't parsed, the edit
screen is missing depth and duration, we can't edit the dive time (and it isn't
passed in on the commit). But it's progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 22:57:47 -08:00
Dirk Hohndel
9be42fff81 QML UI: correct text for context drawer when adding dive
This needs to say "Save" to indicate that you are saving the data that was
entered.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:56:45 -08:00
Dirk Hohndel
0962b504ce QML UI: get add dive closer to being useful
Now we at least start out with the corret date, time and number. This still
isn't functional as a lot of the data aren't used and the way you save the data
is completely silly, but it's another step in the right direction.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:37:18 -08:00
Dirk Hohndel
dc0be271bd QML UI: set up time and dive number when adding dive
Most likely when you manually add a dive on a device it is just about to happen
or just ended, so starting out with the current time is likely a good guess.
Which makes it the last dive in the dive list, so give it the next sequential
number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:34:45 -08:00
Dirk Hohndel
dce3869339 QML UI: don't crash when committing changes and unable to find the dive
This mainly happens because add dive is completely broken right now, but in
general it seems to be good policy not to blindly dereference this pointer...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:24:29 -08:00
Dirk Hohndel
ce2b910cdb Two more helper functions for the QML manager
I'm not sure this is the best way to do this - QML should be able to get to the
model data directly (I hope?). But this seems to work and I need it to make Add
Dive be semi-correct.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 20:02:23 -08:00
Dirk Hohndel
763986b683 QML UI: when adding a dive, start in edit mode
Obviously we don't want to "view" a new dive, we want to "edit" it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 17:06:52 -08:00
Dirk Hohndel
9db615a004 QML UI: show app name in the top bar as Subsurface mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:47:23 -08:00
Dirk Hohndel
6b10c45b2f QML UI: mark locations with GPS data
In the dive detail view, if a location has an associated GPS location, show the
name of the location underlined so the user knows that tapping on it will open
a browser window with a map picture.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
bf239e7c42 QML-UI: add hacky, useless way to show the GPS location of a dive
This is of course stupid and NOT what we want to do, but one could argue it's
better than nothing (well, not sure, whatever). If we have a GPS location
associated with a dive and you tap on the location name when showing the dive
details, it opens a static image of a satellite map with a marker for the dive
site.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
7ffe7a8c8a Dive list model: add GPS string access
If the QML UI needs the GPS information, we need a way to get to it.
I'm not convinced that having it as comma separated string is the best way to
go, but that's what I need for the Google API so that's what I picked for now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:10 -08:00
Dirk Hohndel
07a0ef2139 QML-UI: attempt to improve profile scaling
This still doesn't address all the issues, but appears to be a step
forward. It also contains some debug output to better understand what's
going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 09:03:33 -08:00
Dirk Hohndel
320ff2eba3 Android build: use better sed syntax
There is no reason to use '!' as separator and in some shell environments this
can cause problems.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-25 21:58:30 -08:00
Dirk Hohndel
8e299727df QML-UI: fix black squares on some Android devices
It appears that one some Android devices there is an interaction between
Qt and the GL implementation that results in black squares instead of
icons being shown on the screen.

Disabling the GammaAdjust avoids running the shader and fixes this
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 17:57:40 -08:00
Dirk Hohndel
b747e1bc72 Android build: more tweaking
Don't ever link against a shared libcrypt. One of the recent changes to
make things build on the various Linux build systems apparently broke the
Android build as it now adds an extra -lcrypt right after the correct
static link to libcrypt.a. Instead of fiddling even more with this and
re-breaking all the other builds I just hack around it here and remove any
calls to a simply -lcrypt as that won't work on Android.

This also passes through the remaining options on the command line to make
so we can do things like VERBOSE=1 or -j12

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:52:56 -08:00
Dirk Hohndel
697bd94198 Android build: allow selecting Debug / Release build
And never build the tests. Makes no sense to do so when cross building for
Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:48:44 -08:00
Dirk Hohndel
b87df3ecaa Cmake: don't add the BT_SUPPORT define too early
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-21 10:53:55 -08:00
Dirk Hohndel
a7cf7eb967 iOS build: more progress
Most of the dependencies build now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 14:46:59 -08:00
Dirk Hohndel
0873d46a64 iOS build: only build the parts of openssl that we need
No point in creating the apps, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 13:36:12 -08:00
Tomaz Canabrava
63b01b7510 iOS build: make it possible to compile openssl
It compiles but the link stage fails because of a missing -LSystem
but its a baby step.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 12:16:12 -08:00
Dirk Hohndel
813e49d202 iOS build: baby steps
Get a couple more dependencies built. These were easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:13 -08:00
Dirk Hohndel
8ddb2ebd6b iOS build: hack to build and install libsqlite3.a
Building the iOS command line utility fails. But frankly, we don't need that,
anyway. I cannot figure out how to tell sqlite that all I want is the library,
so I'm working around that by first building the library, then pretending that
sqlite3 was indeed built in order to be able to run make install. Horrible,
ugly, stupid. But it seems to work.

Also cleaned up the whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 10:25:10 -08:00
Dirk Hohndel
b5c30971b6 iOS build: make the README a bit more useful
Still not all that useful, though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:28:53 -08:00
Dirk Hohndel
55b6eaae0b iOS build: fix typo in CFLAGS argument
This way the gethostuuid workaround actually works. It still doesn't compile,
though.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:26:30 -08:00
Tomaz Canabrava
2316390c1f Rework the env - variables to produce a working cross compile script
The cross compile script kind of works right now, it's missing
something that I'm really not sure where or what it is.

currently sqlite will not build because:
	error: gethostuuid is not defined in iOS

This bug was already opened on sqlite bugtracker for about a year, the
workaround is to pass -DDSQLITE_ENABLE_LOCKING_STYLE=0 to the compilation
flags, which I did but did not work for some reason.

Which is a good error - it shows us that we are actually trying to compile
for iOS.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:07:11 -08:00
Tomaz Canabrava
105d698759 Start the iOS cross compile
The build.sh and readme files are the same as the Android ones
and I'll be changing them over time.

The configure-for-ios.sh script is a file that manages to set
everything, compilers frameworks and such, for iOS compilation.

I'll probably dissecate the configure-for-ios.sh file and put it
back on the build.sh, but not now.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:06:29 -08:00