aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-06-12Fix typoGravatar Dirk Hohndel
Duh. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12Don't quit when hitting the back button on iOSGravatar Dirk Hohndel
This should finally fix this problem. Famous last words. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: disable GPS functionality on iOSGravatar Dirk Hohndel
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-12QML UI: somewhat improve GPS list renderingGravatar Dirk Hohndel
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-12QML UI: update for latest KirigamiGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11updated build scripts for MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11Remove unused variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-11Make sure dive computer model is proper malloc'ed allocationGravatar Linus Torvalds
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-11Fix logic for presaturationGravatar Robert C. Helling
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-01Make sure all dive computer events are represented in the plot_info dataGravatar Linus Torvalds
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-01Don't show surface events at the beginning or end of the diveGravatar Linus Torvalds
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-01Don't ignore surface events in xml parsingGravatar Linus Torvalds
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-05-31Don't ignore surface events from libdivecomputerGravatar Linus Torvalds
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-31Make 'clear_dive()' free the primary dive computer data properlyGravatar Linus Torvalds
Our primary dive computer really is special, not just because it's the first one: it's directly embedded in the "struct dive", and so if you just walk the divecomputer list, you'll miss it, because it's not _on_ the list, it is the very head _of_ the list. We had that bug in copy_dive(), and it turns out we have it in clear_dive() too: clear_dive() would free all the dive computers on the list, but not the actual primary one. This is a minor memory leak, no more, so it's not exactly critial, but let's just do it right. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-28Add some gas mix validation to the plannerGravatar Rick Walsh
A few basic rules for gas validation: We can't have <0%, or >100% of either O2 or He O2 + He must not be >100% Switch depth can't be <0% This places limits on user-input values Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-28Shearwater import model name for Petrel and PredatorGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-28Set model on Shearwater importGravatar Miika Turkia
For starters, let's just state that this dive was downloaded from Shearwater. However, once we have information how model numbers map to names, we can use that info for the models we know about. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-28Use serial as device ID on Shearwater importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21fixup: Don't confuse EAD and ENDGravatar Rick Walsh
The previous patch (Planner: add best mix EAD preference) used the term EAD (equivalent air depth) in variable names and strings, when it should have been END (equivalent narcotic depth). They're not the same thing and shouldn't be confused. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Planner: add best mix EAD preferenceGravatar Rick Walsh
Add best mix EAD preference and UI, along with a tooltip describing what it does Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Add best mix function to planner cylinder modelGravatar Rick Walsh
This allows calculation and selection of best mix in the planner cylinder entry, by entering the gas depth, followed by "b" for best (trimix) mix, or "bn" for best nitrox mix. The UI is not intuitive, but it is quick and easy. At the very least, it should be documented. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Add functions to calculate best mixGravatar Rick Walsh
Best mix O2 calculated based on planner Bottom O2 preference Best mix He calculated based on EAD of 30m (should be made user-configurable) Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Make autocomplete work on add diveGravatar Joakim Bygdell
This sets the list models for autocompleting suit, buddy and divemaster. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Add init function to qmlmanagerGravatar Joakim Bygdell
In order to get autocomplete to work on manual dive add we apparently need a separate init function. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16QML UI: hide handles for comboboxesGravatar Joakim Bygdell
Hide the handles for the comboboxes, making the text input fields look like the normal text fields. This is left as a separate patch as there currently seems to be issues with autocomplete on Android. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16QML UI: add comboboxes to DiveDetailsEditGravatar Joakim Bygdell
This adds autocompleting text input fields for suit, buddy and divemaster. [Dirk Hohndel: some whitespace cleanup] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16Add functions to DiveObjectsHelperGravatar Joakim Bygdell
This generated the QStringLists needed to populate the combobxes in DiveDetailsEdit. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16Use manual temperatures in CSV details importGravatar Miika Turkia
When importing dive details from a CSV file, it is better to treat the values as manually imported instead of imported from a dive computer. The original way discarded the temperature values from the details import if a dive profile was imported and merged to the dive details. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16Typo in CSV importGravatar Miika Turkia
Variables are started with $ sign... Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05Fix typoGravatar Miika Turkia
Ends up being "enteryour" without the space. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05NULL terminate the parameters arrayGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05Parse txt formatted log filesGravatar Miika Turkia
This parses .txt log files produced by Dataplus and Oceanlog software. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05Use encoded file name on importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05Allow parsing of .txt files on importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Update translation sourcesGravatar Dirk Hohndel
This removes the strings from the dummy files and the theme test file. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04QML-UI: don't translate the theme test stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04iOS build: dummy qml file to pull in the right dependenciesGravatar Dirk Hohndel
The iOS build process is rather stupid - it scans all .qml files in the root directory of the project to determine which QML dependencies are required. This is why we had the weird leftover fake QML project in our sources. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Android build: we don't need the Qt translationsGravatar Dirk Hohndel
Only the Subsurface translation files as needed as the QML UI doesn't display any Qt internal strings. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04iOS build: create the translations to be bundledGravatar Dirk Hohndel
And add them to the bundle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Find bundled translations on iOSGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04Latest translation updateGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Android build: prepare and copy translations into the APKGravatar Dirk Hohndel
And then load them at runtime. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML DiveDetailsView only use one bottomlayoutGravatar Rick Walsh
Splitting the bottomlayout in two leads to columns in the grid not lining up. It was a workaround that hopefully isn't needed any longer. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML Set width instead of minimumWidth equal to maximumWidthGravatar Rick Walsh
The QML manual advises against setting width property of gridLayout children directly, and recommends setting preferred, min and/or max width instead, letting QML do the work to determine the optimum width. But we've found letting QML determine gridLayout widths leads to infinite loops in too many situations, so we're forcing a width. It's better to force a width by setting it directly, rather than setting minimum = maximum. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Update latest translationsGravatar Dirk Hohndel
This includes the first few terms translated for Subusurface-mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Updated translation sources for QML UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Mark strings in qml files for translationGravatar Robert C. Helling
I did this semi-automatically: I used the script from the previous patch and then did some manual corrections. This marks only title: and text: tags, there might be others Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03A script to find literal texts to be marked for translation in qmlGravatar Robert C. Helling
in perl... Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Revert "QML UI: make sure Kirigami doesn't exit by mistake"Gravatar Dirk Hohndel
This reverts commit 3437fc1a64e5659528f1a0343d53a667147ffc71. Completely bogus.
2016-05-03QML UI: make sure Kirigami doesn't exit by mistakeGravatar Dirk Hohndel
The ApplicationWindow has the backRequested signal and if we don't accept that event, Kirigami will exit the app which is never what we want. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>