aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-25Fix file extension regespGravatar Miika Turkia
The original negative lookahead failed in case the file name contains more than 1 dot as it looks for dot that is not followed by the given extensions. And such a match exists in the file name. The new version should look properly if the file ends with any of the given extensions. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25Add CSV parsing trigger for zxu and zxl filesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25Add DAN DL7 file extensions for import UIGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25Detect pipe as field separator in CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25Add pipe as supported field separator on CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20Don't calculate the 9 minute averageGravatar Dirk Hohndel
We don't do the "smoothed" profile anymore (and haven't for years), so no need to calculate the data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20Only do 9 minute interval for min/max/avgGravatar Dirk Hohndel
We don't use 3 and 6 minute values anywhere, so why calculate them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20Fix 3-, 6- and 9-minute min/max calculationsGravatar Linus Torvalds
Make them use indices into the plot-info, fix calculation of average depth, and fix and add comments. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20Android build: use static libssl / libcryptoGravatar Dirk Hohndel
Android M does not allow using those as shared libraries. See #1029 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20QML UI: don't show add dive button without valid credentialsGravatar Dirk Hohndel
Given that currently we don't deal well with not having a git repository that is linked to cloud storage, don't allow people to add dives unless there are verified cloud credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20QML UI: make sure drawer is really closed after deleteGravatar Dirk Hohndel
At least one iPhone user still has the drawer pop open and prevent them from using the undo function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: make multi column support work againGravatar Dirk Hohndel
Due to a change in Kirigami on most tablets even in landscape mode we are only showing one column. Because of this I missed the fact that I had broken multi column support by mistake. Without setting the width of the dive list it expands all the way and prevents the showing of two pages next to each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19Don't put margins outside the internal ListViewGravatar Marco Martin
put the margins only around the fullscreen delegate of the listview, making the listview go all trough the screen edges. This because the cutted effect when the list view is half scrolled looks quite ugly. Making the ListView reach the borders also moves the scroll indicator at the screen edge where it conventionally is. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: correctly show if we are accessing remote or local storageGravatar Dirk Hohndel
This makes sure that if the user switches to offline mode they don't get incorrect notifications that tell them that they are accessing cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: prevent changing pages while showing the edit/add overlay sheetGravatar Dirk Hohndel
If you switch back to the dive list by swiping horizontally you stay in edit/add mode and then can't select a dive on the dive list. This way you have to discard or save the edit, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19Remove QML files that are no longer usedGravatar Dirk Hohndel
The TextButton was what we used for actions very early on, and the TopBar has now been replaced by the Kirigami header bar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: show dive site on map with left action on dive details pageGravatar Dirk Hohndel
The icon isn't great, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: adapt for latest KirigamiGravatar Dirk Hohndel
In commit 50ebdd020e3c of the Kirigami project the syntax with which actions are added to pages has changed. This commit tracks that, adds the new file that was added in Kirigami and also removes the now obsolete context menus (since we have a working back button on iOS now) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: always show the time stamp when logging dataGravatar Dirk Hohndel
This should help understand some of the issues with git storage and GPS fixes better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18Import picture URLs from divelogs.deGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18Fix broken Bluetooth supportGravatar Rick Walsh
This partially reverts Commit 39313c5 Reported-and-analyzed-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17QML UI: only show GPS service / use current location if GPS accessibleGravatar Dirk Hohndel
If there is no GPS source or if permission to use it was denied, don't offer to run the GPS service or to detect the current location when adding or editing dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17QML UI: make the state of the GPS service available to QMLGravatar Dirk Hohndel
This exposes a locationServiceAvailable property to QML and keeps it in sync with the corresponding state in the GpsLocation widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17With patched Qt 5.6 for iOS correctly handle disabled GPS sourceGravatar Dirk Hohndel
Qt 5.6.0 is broken when it comes to using CoreLocationService on iOS. It doesn't even check if the location service is enabled. My patches fix that and make Qt set an error code right after service creation. Having the service creation fail is actually the wrong thing to do because then Qt switches over to GeoClue and that really isn't helpful for our needs here. Additionally, Qt 5.6.0 without my patches doesn't follow the REQUIRED flow of using the location service as it does not check the access permissions before accessing the GPS service - without doing so the GPS service will not run in the background. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17GPS provider: change haveGPS status if GPS source returns errorGravatar Dirk Hohndel
If the GPS source returns an error that could be an indication that the user hasn't given us permission to use it, so switch our status to NOGPS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17GPS provider: track tristate information for GPS sourceGravatar Dirk Hohndel
Initially we don't know if we have a source. After that we may think that we have one, or not have one (but that can actually change while the program is running if the user, for example, turns the source off or switches to airplane mode). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17iOS build: include the libraries for the phone simulatorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15QML UI: quit on back key while showing dive listGravatar Dirk Hohndel
Make sure you save first, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15QML UI: rewrite the commitChanges functionGravatar Dirk Hohndel
I couldn't figure out how to break this down into small, useful commits. Part of the problem is that I kept going while working on this and as you can see from looking at the commit, diff tries so hard to find small code fragments that moved around, that the diff overall becomes quite unreadable and it seemed impossible to recreate the sequence of steps after the fact. It all started with adding the parsing for the GPS coordinates. But while testing that code I found several issues with the rest of the function. Most importantly it seemed ridiculous that we carefully tried to match the texts that the DiveObjectHelper would create for the various fields, instead of just using the DiveObjectHelper to do just that. And once I had converted that I once again realized just how long and hard to understand that function was getting and decided to break out some of the more complex parts into their own helper functions. But of course all this didn't happen in this logical, structured, ordered way. Instead I did all of these things at the same time, testing, rearranging, etc. So in the end I went with one BIG commit that does all of this in one fell swoop. This adds four helper functions to deal with start time/date, duration, location and gps coordinates, and depth of the dive. To avoid mistakes when dealing with the GPS coordinates, there's another helper to encapsulate the creation of the dive site and we switched to a current GPS location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15QML UI: add elements to allow editing the GPS coordinatesGravatar Dirk Hohndel
This isn't hooked up, yet, but provides the UI Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15QML UI: fix the save to cloud logicGravatar Dirk Hohndel
There were several logical flaws here. Ugh. Don't save things if there are no unsaved changes, if we haven't initialized this repository from the cloud or if we are already saving things. Then, once we decide that we should save, first always save to the local cache and then check if we should save to the cloud and do so if requested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15QML UI: stop using "--" for empty stringsGravatar Dirk Hohndel
I can't remember why we started doing this, but at this point I find it just weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Copy coordinates when renaming siteGravatar Miika Turkia
Let's not discard our GPS location when editing site name on mobile. Fixes #1051 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14QML UI: don't try to scroll to dive at time 0Gravatar Dirk Hohndel
If no timestamp is available, just start at dive 0. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Set default build number for apk buildingGravatar Miika Turkia
Having build number as mandatory parameter seems unnecessary, thus setting default value (used for andoird:versionCode) to 0. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Fix initial build of APKGravatar Miika Turkia
Running subsurface/packaging/android/build.sh after deleting subsurface-mobile-build-arm directory fails for me due to missing ssrf-version.h file. Just ignore if it doesn't exist. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Hack to work around issue in current Kirigami masterGravatar Dirk Hohndel
Commit 339411cca69b in Kirigami master tries to reparent the OverlaySheet to the page that it is related to. Unfortunately the heuristic used there to find the right object assumes that every page has a contentItem property, which our DiveDetails page doesn't have. As a hack to work around this issue (until this is fixed upstream in Kirigami) we simply create such a property. This commit should be reverted once Kirigami upstream has been fixed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14QML UI: keep QML manager and the UI in sync about selected diveGravatar Dirk Hohndel
The manager can now directly update the index of the selected dive, and the UI tells the manager the timestamp of the currently selected dive. This allows the manager to pick the best possible dive as selected dive if things change (for example if the dive list gets reloaded because it changed in cloud storage). Fixes #1009 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Make it easy to access the sort model from the QML managerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14QML UI: clear the flag indicating that we are accessing storageGravatar Dirk Hohndel
If the automatic sync is turned off we could be stuck in a state where we always thought that we were already in the middle of a save. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Make the raw timestamp available in QMLGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Add helper to find the dive closest to a given timeGravatar Dirk Hohndel
If we want to keep the selected dive "close" to where it was before an operation (whether a delete, or a reload, or something like that), then the most intuitive thing to do appears to be to select either the same dive again (if it still exists), or one very close to it in time. This helper allows us to identify the dive in the current dive list that is closest to the given time. We do this in the C code to ensure that we look at all dives in the dive_table - based on the id that is returned the UI can then figure out where this dive is currently shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14Silence warningGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-13Remove unused functionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11Build instructions to deplay on you own iOS deviceGravatar Robert C. Helling
... so others might have less trouble. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11Upon undoing a dive deletion select that diveGravatar Robert Helling
Before it had the next dive still selected. Fixes #1053 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11Merge branch 'for_dirkhh' of https://github.com/atdotde/subsurfaceGravatar Dirk Hohndel
2016-04-11VPM-B profile: declare CVA iteration variables within each loopGravatar Rick Walsh
The variables that control each CVA iteration should be declared at the start of each loop so that the values are carried over from one iteration to the next. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-04-11Fix time of first ceiling calculationGravatar Robert C. Helling
In our verision of VPM-B for real dives, we take as the deco time the difference between the time of the deepest ceiling and the time when the ceiling clears. When the display of ceilings was set to multiples of 3m this was confused, as the maximum finder had issues: First of all, it updated the time when the ceiling was the same (which was almost always the case for stepped ceilings) but changing >= to > was not enough, since then the first time a deepest stepped ceiling was reached was used. This patch uses the actual ceiling (not rounded to the next integer multiple of 3m) for this calculation to get rid of this problem. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-04-11Fix seabear import sample overrun bugGravatar Linus Torvalds
The Seabear import fixed up the NDL and TTS in the samples from minutes (in the import) to seconds (our internal format for all time). But it did it with a loop that overran the end of the samples array by one: for(int s_nr = 0 ; s_nr <= dive->dc.samples ; s_nr++) { Fix it to use the proper "<" instead of "<=". Reported-by: Stuart Vernon <stuartv@force2.net> Tested-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>