Commit graph

11041 commits

Author SHA1 Message Date
Rick Walsh
7b891904e7 Rename conservatism_level to vpmb_conservatism
Make the variable purpose less ambiguous

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24 08:29:56 -07:00
Miika Turkia
2b14a9c95d Support for comma as field separator for ADP
This adds support for comma as field separator for ADP import.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24 08:29:34 -07:00
Miika Turkia
71273945c6 Support hⓂ️s format for duration on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-24 08:29:24 -07:00
Dirk Hohndel
f4ca863a91 Correctly pick up the UI language from settings
While Linux can set the locale from the language text, Windows needs the
correct locale value (which makes more sense to use, anyway - that's why
we save it).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-22 22:07:42 -07:00
Dirk Hohndel
14fff2fc93 Add second copy of the GPL
Renaming the GPL file to LICENSE seemed simple but actually had
unintended side effects. Instead of messing with this let's simply have
two copies.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-22 18:15:26 -07:00
Dirk Hohndel
8cc7e63309 Add commented out hack to dump all CMake variables
I use this all the time when debugging CMake issues.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-22 17:12:49 -07:00
Dirk Hohndel
131c5a2abe Fix building of Facebook support
No idea when this got broken. Fix seems like a hack as that variable
should get set in the plugin CMakeLists.txt. But it seems to work, so
"whatever".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-22 17:12:00 -07:00
Dirk Hohndel
78dc3a3efe Revert "Add a simple cp2130 libusb driver"
This reverts commit 93ef223a31.
2016-09-22 14:56:31 -07:00
Dirk Hohndel
f35f767240 Move license file to LICENSE
This way the github license API can detect which license we use.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-21 15:28:05 -07:00
Tomaz Canabrava
ce838b9982 Beginning of the DiveComputer unittests.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-21 09:48:45 -07:00
Tomaz Canabrava
41db8ea219 Finished unittest for cloud storage.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-21 09:48:45 -07:00
Dirk Hohndel
b972bdb97d Language preference: store the locale name in the settings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:48:30 -07:00
Dirk Hohndel
67a226c00a Language preference: search for the locale instead of the language string
And make sure that you use the language / country delimiter that we use in the
file system

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:48:30 -07:00
Dirk Hohndel
6b181d6b85 Language preference: remove the .qm suffix before handling locale
Otherwise things don't match as one might expect...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:48:30 -07:00
Dirk Hohndel
5fdbc1ffc3 Language preference: once we figure out the locale, remember it
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:40:30 -07:00
Dirk Hohndel
743f73e4a3 Don't look up the setting again
This caused us to do the wrong thing if the setting wasn't set at all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:38:23 -07:00
Dirk Hohndel
a31dd6c1c0 Preferences: remember both the locale name and the user friendly text
Currently we are confused which it is we are looking at and so setting the
language is broken.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 12:35:49 -07:00
Dirk Hohndel
c809a8873c Second attempt to fix crash
Linus pointed out that it might be another call site (and looking at his
proposed patch I noticed a logic error in my earlier attempt)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 09:26:35 -07:00
Dirk Hohndel
92caf2771b Pull latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 08:54:01 -07:00
Dirk Hohndel
076d8966f0 Prevent possible NULL pointer dereference
Not sure if this will fix the crash for Henrik, but it's worth
a try.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 08:47:08 -07:00
Dirk Hohndel
13dbbd3085 QML UI: smaller fonts on narrow screens
This may be excessive, but it fixes the issue with the German localization on
some narrow screens.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 08:47:08 -07:00
Dirk Hohndel
fd27c3fa23 iOS build: add required key for iOS 10
This one's weird. We actually don't access the Photo Library. But
maybe it's the access to the local files (in order to store the
dive data) that causes this?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 07:36:33 -07:00
Dirk Hohndel
e1a2074cb3 iOS build: adjust configure flag for libdivecomputer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-19 17:09:27 -07:00
Dirk Hohndel
3ea15febfa Fix compile error on Windows
We need to return a DC_STATUS here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-18 07:41:55 -07:00
Anton Lundin
93ef223a31 Add a simple cp2130 libusb driver
This adds a simple cp2130 userspace driver. Its probably unusable in the
real world but its a great base to build upon.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-18 07:12:16 -07:00
Anton Lundin
e0fe8762c2 Fix warning about incompatible pointer
The set_halfduplex function takes a unsigned int, not a int.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-18 07:11:45 -07:00
Anton Lundin
f9cd09b000 Workaround abuse of the now missing DC_TRANSPORT_BLUETOOTH
The DC_TRANSPORT_BLUETOOTH is quite abused here, and I removed it in our
custom serial code. This works around the issue so subsurface still
compiles.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-18 07:11:34 -07:00
Anton Lundin
ffa3c48593 Rewrite libdivecomputer custom serial code
This rewrites the custom serial code to use the new api which I
implemented in the Subsurface-branch of libdivecomputer.

This is a bit to big patch but I haven't had the time to break it down
into more sensible patches.

This rewrite enables us to support more ftdi based divecomputer
communication and is tested with both a OSTC3, OSTC2N and a Suunto
Vyper, all over the libftdi driver.

The bluetooth code paths are tested to, and should work as before.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 15:47:37 -07:00
Joakim Bygdell
1219dc6931 QML UI: deal with multiple buddies correctly
When editing adive in Subsurface-mobile we can only handle one buddy
due to the limitations of the combobox. To prevent loss of data when editing
a dive with more than one buddy we display "Multiple Buddies" in the buddy
field. This creates a special case where no changes are written to the buddy field
unless the user changes buddy for that dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:46:15 -07:00
Robert C. Helling
ed11dab7fb Compute total tissue saturation for all deco models
... and not just for Buehlmann. This makes the saturation
graphs meaningful for VPM-B.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:43:28 -07:00
Robert C. Helling
1b57b6cc17 Separate method for heatmap color scaling
I separated out the color scaling and slightly simplified the expressions.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:42:46 -07:00
Rick Walsh
1cae1255d7 Allow heat map to zoom
Setting the pen to non-cosmetic means the painted width scales when zoomed

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:42:33 -07:00
Rick Walsh
ddc7f3dc98 Adjust heat map colour scale
Make the heat map use a colour scale similar to that by Kevin Watt, as used in
Simon Mitchell's presentation, Decompression Controversies
https://www.youtube.com/watch?v=UY61E49lyos&t=2090&authuser=0

Undersaturated: cyan -> blue ->purple -> black
Supersaturated up to M value: black -> yellow -> red
Exceeding M value: red -> white

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:42:08 -07:00
Robert C. Helling
cd99bbe727 Cosmetic changes to Buehlmann code
Change runtime table string from ZHL-16B to ZHL-16C to reflect he fact
that we use 5min as half-time for the fastest compartment rather than
4min.

Further more trade pow(2.0, ...) for exp().

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:41:12 -07:00
Robert C. Helling
893bea700c Introduce heat map
This replaces the tissue percentage graph that probably nobody ever
understood with a heat map like the one used in the discussion
of bubble model deco. The information shown is the same but the
saturation is now in the color while the tissue determines the y
position.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:39:54 -07:00
Rick Walsh
6f43c16ea9 Preferences UI: graph tabstop order should match display order
When 'tabbing' through data fields, the order should be the same as the order
displayed on the screen. Getting the order right in the .ui file fixes the
tabstop order without needing to define it explicitly.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:38:12 -07:00
Dirk Hohndel
1d8a77ef5c Bump mobile version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 12:59:46 -07:00
Dirk Hohndel
b8253bb707 QML UI: two columns on 1024x768 iPads
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 12:56:47 -07:00
Dirk Hohndel
33f006194b iOS build: no longer request location information
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-10 08:38:19 -07:00
Dirk Hohndel
285c3a9b66 Update Subsurface-mobile manual stored in git
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 11:19:04 -07:00
Dirk Hohndel
f40d5ff0a1 Update the README for building the iOS version
This still isn't quite straight forward, but at least now the README matches
the process that I use again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 11:17:44 -07:00
Dirk Hohndel
80eafb8db7 Fix some warnings
At least the warnings about size potentially being uninitialized seem correct
and valid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 10:27:56 -07:00
Dirk Hohndel
3affaedb38 Update Subsurface-mobile version to 1.1.0
Just so that the iOS release has a sane starting point - and frankly,
we've done a very poor job of maintaining this version number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 09:53:24 -07:00
Dirk Hohndel
3f78283895 Update Subsurface-mobile manual
Correctly differentiate Android and iOS features.
Adapt style to be generally in the second person.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 09:53:24 -07:00
Dirk Hohndel
4938a7a10f iOS: Don't show "No GPS source available"
We don't support GPS on iOS right now, the message is confusing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 08:57:09 -07:00
Dirk Hohndel
055276f1ba iOS build: re-enable building libraries for the simulator
We now build Kirigami as part of Subsurface-mobile itself, so the simulator
builds work again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:54:22 -07:00
Dirk Hohndel
830d9163dc iOS build: Fix compile failure
Without this moc_SubsurfaceObjectWrapper doesn't compile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:52:18 -07:00
Linus Torvalds
833683521a Stop trying to fix up pressure sensor indexes
This removes 'fixup_dc_cylinder_index()', which was added to fix up the
pressure sensor indexes from the Atomic Cobalt dive computer.

Even for the Cobalt it really shouldn't matter, because the
libdivecomputer backend for the Cobalt actually tries to do the right
thing.  See for example commit 8853a1ccd422 ("Associate the pressure
samples with the primary tank.") in libdivecomputer.

Some historical digging shows that the subsurface sample pressure index
code came in from commit e32ba4d6d8 ("Improve tank handling for
Cobalt"), dated Tue Oct 28 13:48:15 2014.

And the libdivecomputer "use the right cylinder" code was around the
same time (Fri Oct 10 20:29:17 2014 +0200).

So I suspect that subsurface needed the fixup based on an older version
of libdivecomputer.  Jef's patch is a couple of weeks before, but we may
not have tracked libdivecomputer religiously.

The reason to remove this code is because it can (and does) mess up the
sensor index when it is actually reliable, like in the multi-sensor case
of the Suunto EON Steel.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:37:28 -07:00
Joakim Bygdell
4e0200863b Remove hacks regarding multiple gasmixes and cylinders
Enabling cylinder edit in Subsurface-mobile our previous hacks
regarding multiple cylinders and gasmixes must be removed.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:36:43 -07:00
Joakim Bygdell
674d8331f5 QML UI: Enable cylinder edit
This adds the option to select a cylinder when adding or editing a dive.
Due to limited screen size we restrict the editing to the first cylinder only.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:36:13 -07:00