aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-08-02QML UI: enable modification of ratingsGravatar Joakim Bygdell
This enables editing of visibility and ratings for a dive. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02QML UI: display rating and visibility starsGravatar Joakim Bygdell
Display rating and visibility stars on the dive details page. See #495 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02Add star iconsGravatar Joakim Bygdell
Add star icons from the material repository. https://material.io/icons/ The icons are under Apache License Version 2.0 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-01QML UI: hide action button when keyboard is visibleGravatar Joakim Bygdell
Until we get some solution from upstream this patch to Kirigami hides the action button when the keyboard is visible. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-01Configure ostc4: Correct button sensitivity rangeGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-08-01Configure ostc4: Wire up reset buttonGravatar Anton Lundin
I previously forgot to enable the reset button. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-08-01android: access() is declared in unistd.hGravatar Anton Lundin
Calling access() makes no sense at all on android, but this atleast fixes a compilation error on ndk 15+. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-08-01Null check before writing to pointerGravatar Anton Lundin
In the serial api for libdivecomputer is ok to send NULL as the int pointer actual, if you dont't care about how many bytes that where actually read or written. This makes sure we don't crash if the ble backend where ever used with such a backend. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-08-01Print Qt version when started in verbose modeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-01MXE build: don't use host cmakeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-31Smaller buttons on map widgetGravatar Robert C. Helling
... so they take up less space while still being clickable. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-07-31QML UI: stop showing location labels earlierGravatar Dirk Hohndel
We are stepping by 2 - so 11 makes it clear that at 12 the labels are shown, but at 10 they are not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-31mobile: make sure old credentialStatus is definedGravatar Jan Mulder
In commit e76f527fe53063, the scenario of switching between 2 already VERIFIED cloud accounts was identified, which was working poorly. It needed a restart of the app to get the new account visible. Reason for this, was the setting of the credentialStatus to the value of an undefined (never set) old credentialStatus. This commit makes sure we have a defined credentialStatus, just before changing it to the new one. A really mini step forward, as the behavior is still not perfect. Now, the user has to select the dive list manually, after entering credentials of the new clould account. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-31Revert "MXE build: drop all WebKit dependencies"Gravatar Dirk Hohndel
This reverts commit 916d4b8cce55120a37be86fcad8f124670f15a99. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-30Tweak the "display_unused_tanks" preferences logicGravatar Linus Torvalds
This is really unrelated to my recent "multiple gas pressures" work, but the test case from Gaetan Bisson showed that the logic for which cylinders to show in the equipment tab was less than optimal. We basically used to show only cylinders that were actively used, unless you had the "display_unused_tanks" preference option set. That comes from some dive computers reporting a *lot* of cylinders that the diver really doesn't even have with him on the dive. And showing those extra dummy cylinders gets pretty annoying after a time, which is why we default to not showing unused tanks. However, in Gaetan's case, he had a total of four cylinders on the dive: the O2 and diluent bottle for the rebreather dive, and then bailout bottles (both air and deco). And while the bailout bottles weren't actually used, Gaetan had actually filled in all the pressure details etc for them, and so you'd really expect them to show up. These were *not* just some extraneous default cylinder filled in by an over-eager dive computer. But because the bailout wasn't used, the manual pressures at the end were the same as at the beginning, and the "unused cylinder" logic triggered anyway. So tweak the logic a bit, and say that you show cylinder equipment not only if it has been used on the dive, but also if it has any pressure information for it. So the o nly cylinders we don't show are the ones that really have no interesting information at all, except for possibly the cylinder tank type itself (which is exactly what the over-eager dive computer case might fill in, usually in the form of a default cylinder type). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-30For more manual gas pressure detailsGravatar Linus Torvalds
So the manual gas pressure case keeps showing issues, and in many ways it really is a fairly complex thing, since it needs interpolation of the intermediate pressures - possibly over several gas changes. So you might have beginning and ending pressures for one cylinder, but then use another cylinder in between. We've historically got all the code to do this, but the big rewrite for multiple cylinder pressures didn't get all the details right, and so here's a few more fixes for the case that was shown by a dive by Robert Helling. Hopefully we're approaching the old code situation, except now with concurrent gas pressure handling support. Reported-by: Robert Helling <helling@atdotde.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-30Fix another cylinder pressure plotting special caseGravatar Linus Torvalds
The core to plot manually entered pressures without any sample data did the obvious thing: it ended the pressures at the end of the dive as indicated by the last sample. However, that obvious thing didn't actually work, because sometimes the last sample is long long after the dive has actually ended, and we have no plot_info data for that. This depends on the dive computer used: most dive computers will not report samples after the end (even if they may internally remember them in case the diver just came up to the surface temporarily), but some definitely do. The OSTC3 is a prime example of that. Anyway, the code was fragile and wrong - even if passed a time past the end of the plot_info data, "add_plot_pressure()" should just have associated that with the last entry instead. Which also allows us to simplify the whole endtime logic entirely, and just use INT_MAX for it. Gaetan Bisson's test-case also showed another oddity: we would plot the gas pressure even for cylinders that had no has use (ie beginning and ending pressures were the same). That's kind of pointless in so many ways. So limit the manual pressure population to cylinders that actually have seen use. Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-30worldmap-save: don't use an API keyGravatar Lubomir I. Ivanov
The Google Maps API V3 *does* require a key if one needs to generate a lot of payed trafic and monitor said trafic, otherwise it doesn't: https://stackoverflow.com/a/8785844 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: drop all WebKit dependenciesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: copy the QML modules we needGravatar Dirk Hohndel
And include them in the installer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: better logical groupingGravatar Dirk Hohndel
This just makes more sense in which variables go with which code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: include QtLocation DLLGravatar Dirk Hohndel
Another one that otherwise gets missed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: install esri pluginGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29MXE build: remove MarbleGravatar Dirk Hohndel
Also, don't package the data directory (which held marble data) anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Correctly create cloud account from mobileGravatar Jan Mulder
The creation of a cloud account from mobile was broken. This fixes it. Basically, we need to go online for a moment, and setup a correct local and remote repo for the cloud storage. Tested for the following scenarios: 1) inital account creation including PIN handling from mobile, from a clean install . 2) open an already validated cloud account from a clean install. 3) open no-cloud style local account. 4) Switch between 2 already validated could accounts. 5) Try to create a cloud account without data connection. Notice that scenario 4) does not work perfectly. A restart of the app is needed to see the new logbook. So that is to be fixed. Scenario 5) seems a non realistic corner case. This does not work in a gracefull way. The user needs to remove the app, install it again, and retry with data connection. Further notice this is backgroud/core processing only. So no QML UI changes as proposed (for example) bij Davide. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29Trivial log string correctionGravatar Jan Mulder
The PIN (and cloud account creation) is not limited to the desktop (any more). Correct the string accordingly. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29Use same libgit2 on AndroidGravatar Jan Mulder
Just to be sure. Use the same version on Android build of libgit2 as used in the scripts/build.sh script. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29strstr is a case sensitive compareGravatar Jan Mulder
strstr is a case sensitive compare and the string reported from libgit2 reads "reference" and not "Reference". Further investigation reveals commit 909d5494368a0080 of libgit2. Here, the change is made from Reference to reference, breaking our rather poor way of detecting something from an error string. So, to be future-proof to more libgit2 oddities, it might be wise to use strcasestr in this situation. But this seems a not fully supported variant of strstr, so leave it at this point. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29Fix small memory leakGravatar Jan Mulder
Add 2 forgotten free() statements for the temporary used string buffers. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29Mac build: adjust sign scriptGravatar Dirk Hohndel
Add QtLocation and QtQuickWidgets. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Mac bundle: no more MarbleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29build.sh: add quotes to if clauseGravatar Dirk Hohndel
Otherwise this will cause error when the variable is undefined. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29build.sh: don't build with WebKit unless explicitly requestedGravatar Dirk Hohndel
Even if WebKit may exist on Linux, by default we no longer should build against it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Travis: switch to Qt 5.9.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Travis: build without WebKit by defaultGravatar Dirk Hohndel
All these hacks are no longer needed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-29Mac install: add missing esri pluginGravatar Dirk Hohndel
Thanks to Lubomir for figuring what was missing! Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Map: try to wait for Map to loadGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Map: mark function as overrideGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28cmake: install QML components for Subsurface as wellGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28cmake: only install Marble files when we use MarbleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28build.sh: redo command line parsingGravatar Dirk Hohndel
And in the process make NOT building against Marble the default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Switch new files to unix line endingsGravatar Dirk Hohndel
I thought we had this automated, but Lubomirs commits introduced a few files with dos line endings. This is purely a change of line endings, no other changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Import all pressure sensors from Liquivision logsGravatar Linus Torvalds
The other pressure sensors were disabled on import because we didn't use to handle multiple sensors well at all. Now it "JustWorks(tm)". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Fix manual pressures for cylinders with no gas switchesGravatar Linus Torvalds
"If it hasn't been tested, it doesn't work". All my testing of the multiple sensor pressures have been with some reasonably "interesting" dives: they actually *have* sensor pressures. But that test coverage means that I missed the truly trivial case of just having manual pressures for a single cylinder. Because there's only a single cylinder, it doesn't have any cylinder changes, and because there were no cylinder changes, it never filled in the use range for that cylinder. So then it never showed the pressure profile at all. Duh. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Calculate momentary SAC rates with the right gasesGravatar Linus Torvalds
The momentary SAC rate got broken by the multiple ressure handling too, and always used just the first cylinder. This uses the new "get_gasmix()" helper to see what you're breathing, and will do the SAC rate over all the cylinders that contain that gas. So it should now DTRT even for sidemount diving (assuming you had the same gas in the sidemount cylinders). NOTE! We could just do the SAC rate over *all* the gases you have pressures for, and maybe that's the right thing to do. The ones you are not breating from shouldn't have their pressure change. But maybe some people add their drysuit argon gas to the gas list? So this may need more work, but it's a step in the right direction. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Use the right gasmix for deco calculationsGravatar Linus Torvalds
In commit e1b880f4 "Profile support for multiple concurrent pressure sensors" I had mindlessly hacked away at some of the sensor lookups from the plot entries to make it all build, and forgotten about my butchery. Thankfully Jan and Davide noticed in their multi-cylinder deco dives that the deco calculations were no longer correct. This uses the newly introduced "get_gasmix()" helper to look up the currently breathing gasmix, and fixes the deco calculations. Reported-and-tested-by: Jan Mulder <jlmulder@xs4all.nl> Reported-by: Davide DB <dbdavide@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Add "get_gasmix()" helper function to iterate over gas changesGravatar Linus Torvalds
We have a few places that used to get the gasmix by looking at the sensor index in the plot data, which really doesn't work any more. To make it easier for those users to convert to the new world order, this adds a "get_gasmix()" function. The gasmix function takes as its argument the dive, the dive computer, and the time. In addition, for good performance (to avoid looping over the event list over and over and over again) it maintains a pointer to the next gas switch event, and the previous gas. Those need to be initialized to NULL by the caller, so the standard use-case pattern basically looks like this: struct gasmix *gasmix = NULL; struct event *ev = NULL; loop over samples or plot events in increasing time order: { ... gasmix = get_gasmix(dive, dc, time, &ev, gasmix); ... } and then you can see what the currently breathing gas is at that time. If for some reason you need to walk backwards in time, you can just pass in a NULL gasmix again, which will reset the event iterator (at the cost of now having to walk all the events again). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Fix possible memory corruptionGravatar Jan Mulder
A user reports a SIGSEGV that points to DownloadFromDCWidget::updateProgressBar() in relation to strlen()/strdup(), at end of download. Reading the code, as I can't reproduce the crash, it seems that the progress_bar_text is set to NULL and later strdup-ped. The man page is not fully clear on this, but setting it to the empty strings is much safer. Might fix: #507 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-28map: whitespace cleanup in QML and C++ filesGravatar Lubomir I. Ivanov
- remove ";"s - remove {} where not needed or move them to the same line Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget.qml: track the coordinatesChanged() signal in QMLGravatar Lubomir I. Ivanov
The C++ side for the desktop version already does that. Add a slot for that in QML, for later use in the mobile version. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>