summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-07-26Test dive for DM4 import comparisonGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Remove bogus fixGravatar Dirk Hohndel
In commit 156ad42a3cc9 ("snprintf is happier if it has an explicit string literal format argument") I got a little too aggressive making sure there are string literal format strings... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Planner: Add parentheses to output conditionGravatar Rick Walsh
Aids reading the code, doesn't alter the logic. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Planner: Count the minimum stop time towards o2timeGravatar Rick Walsh
When doing backgas breaks, count the minimum stop time towards o2time. Previously, the initial minimum stop wasn't counted, so the time of the first segment on oxygen was min_switch_duration + 12 minutes. E.g. with 1 minute minimum switch duration. Previously: depth duration runtime gas 40m 1min 1min air 40m 34min 35min 21m 2min 37min 21m 1min 38min EAN50 18m 1min 39min 15m 3min 42min 12m 4min 46min 9m 5min 51min 6m 13min 64min oxygen <--13 minutes on O2 6m 6min 70min air 6m 2min 72min oxygen 0m 1min 73min Now: depth duration runtime gas 40m 1min 1min air 40m 34min 35min   21m 2min 37min   21m 1min 38min EAN50 18m 1min 39min   15m 3min 42min   12m 4min 46min   9m 5min 51min   6m 12min 63min oxygen 6m 6min 69min air 6m 2min 71min oxygen 0m 1min 72min   Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Planner: Hide unwanted transition between deco stopsGravatar Rick Walsh
If display transitions in deco isn't selected, then we shouldn't show the transition segment between two deco stops, even if there is a gas change. We should still show the ascent segment up to the first deco stop. The (gaschange_after && !isascent) condition is necessary to pick up backgas breaks. An example plan is shown below. Previously: depth duration runtime gas 40m 1min 1min air 40m 34min 35min   21m 2min 37min   <--meaningful ascent segment 21m 1min 38min EAN50 18m 1min 39min   15m 3min 42min   12m 4min 46min   9m 5min 51min   6m 0min 51min   <--unnecessary ascent segment 6m 13min 64min oxygen 6m 6min 70min air 6m 2min 72min oxygen 0m 1min 73min   depth duration runtime gas 40m 1min 1min air 40m 34min 35min   21m 2min 37min   <--meaningful ascent segment 21m 1min 38min EAN50 18m 1min 39min   15m 3min 42min   12m 4min 46min   9m 5min 51min   6m 13min 64min oxygen 6m 6min 70min air 6m 2min 72min oxygen 0m 1min 73min   Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Planner: use pointer to deco stop level array instead of memcpyGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26Planner: Change 3m stop to zero if last stop is 6mGravatar Rick Walsh
When the last stop at 6m/20ft option is selected, replace the 3m/10ft stop with zero depth, rather than doubling up on the 6m/20ft stop. This removes the need to differentiate between 6m (=6000mm) and 20ft (=6096mm) and saves calling a helper function. It does not alter the calculated profile at all. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26QML UI: add style to the menu buttonGravatar Joakim Bygdell
Add some style to the menu button so that it fits the theme. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26QML UI: add Subsurface mobile to top of appGravatar Joakim Bygdell
We have space over so lets add the name to the top. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26QML UI: make the app blueGravatar Joakim Bygdell
White is boring, so lets change the color of the android app to a more pleasing subsurface blue. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26QML UI: create menu to house the buttonsGravatar Joakim Bygdell
Runing the android version on a phone the screen must be tilted sideways to accommodate all buttons. This creates a single button that triggers a popup menu that houses the buttons. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Move initialization of preferences to helper functionGravatar Dirk Hohndel
This way we can read the preferences without instantiating the PreferencesDialog class. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Don't show the survey for the mobile appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25We do not change the displayed_dive_site - don't reset itGravatar Tomaz Canabrava
It seemed correct when we changed the dive_site that we could be editing, but we don't do that anymore. (I actually think this should be self-contained, no global that a lot of widgets can change) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Break long linesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Show dive_site info on the labelsGravatar Tomaz Canabrava
Correctly show the dive_site information on the labels. still crashes on accept / reject. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Clean code from the dive site editGravatar Tomaz Canabrava
This is an edit dialog, not a create dialog. This makes Subsurface crash but it's a step in the right direction. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Close the dive site edit when accepting/rejecting itGravatar Tomaz Canabrava
Return to the default mainwindow state when the user accepts or rejects the dive site edit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25Re-enable the dive site editGravatar Tomaz Canabrava
Since now we found the perfect way to deal with dive site handling on the dive, we can reenable this widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25snprintf is happier if it has an explicit string literal format argumentGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-25QML UI: Show profile on AndroidGravatar Grace Karanja
This is a better way for showing the profile. The show() and hide() statements are replaced by a QTransform statement. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-24Create test case for DivingLog SQLite importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24Allow creating new dive site with specific uuidGravatar Miika Turkia
Test cases require deterministic results and thus we should allow uuid to be specified when needed. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24Cobalt import: use find or create divesiteGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24Divinglog import: find or create divesiteGravatar Miika Turkia
We obviously should lookup if the dive site already exist before creating a new one. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24QML UI: make sure the dive list is empty before loading divesGravatar Dirk Hohndel
When testing subsurface-mobile on the desktop from an account that had a default file set up in the Subsurface preferences that file would already be loaded creating rather confusing output. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24QML UI: sort by date, not by date stringGravatar Dirk Hohndel
Just a quick bit of cleanup to separate date (the sortable, numeric value) from the date string that we want to display (but not sort by). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24Merge branch 'devel' of https://github.com/gracie89/subsurfaceGravatar Dirk Hohndel
2015-07-24Spell rebreather with an hGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23Update user manual to reflect new way of DivingLog importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23Planner: correct output of planner modeGravatar Rick Walsh
Previously we used strncat to output VPM mode without correctly defining the length of the string, and didn't do anything for recreational mode. This resulted in the output being junk recycled from the previous temp string. We could use strncat if the string length were defined, but using snprintf will make it simpler to include the VPM conservatism when that has been implemented. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23Divinglog import: fix maximum depthGravatar Miika Turkia
Max depth is recorded in floating point in metadata. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-23QML UI: Add download from divecomputer windowGravatar Grace Karanja
Add a window to be used when downloading from dive computers. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22Make password change asynchronousGravatar Dirk Hohndel
This isn't perfect (if you make multiple requests things could go badly), but it's better than just slapping the new password into the settings, even if the update failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Add sample pressure to be auto-filled on Seabear importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Include debug printout for easier manual testingGravatar Miika Turkia
When Subsurface is run with high enough verbosity level, generate command line to test Seabear import manually with xsltproc. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Fix Seabear CSV importGravatar Miika Turkia
It seems that adding parameters to the Seabear import has resulted in the parameters to be missed. And this led to parsing error / recursion. This patch tries to tackle the problem by introducing dynamic parameter counter to the mix. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Clean up some parameters on CSV importGravatar Miika Turkia
We do not really need the buffers when doing CSV import. Instead we use dynamic memory allocation for the values. Note that Seeabear part is not tested as it that import is not working for me anymore. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Always use "csv" parsing for SeabearGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Strip unit from Seabear sample interval valueGravatar Miika Turkia
XSLT parsing treats this as numeric value, thus we need to strip out the " s" part. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Fix Seabear import if line ends with NLGravatar Miika Turkia
We need to start second search from the start of the buffer if \r\n search returns nothing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Add a known type for second DC on APD importGravatar Miika Turkia
This patch adds importing of sensor values from the second DC on APD log import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Import sensor values for autodetected APD filesGravatar Miika Turkia
If APD Log Viewer format is automatically detected, we should set the sensor values to be imported properly. These need to be added to the firstline and since we convert the number 2 from column headers to subscript, this step must be skipped for the APD import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22CSV import test wrong valuesGravatar Miika Turkia
We need to test for the sensor values on CSV import, not the po2. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Clean hard coded values on divelog CSV importGravatar Miika Turkia
Hard coding the values of known imports is quite awkward if we add these. Thus switching to use enum and names instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Increase the recursion for Seabear CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22Cloud storage: enable password updateGravatar Dirk Hohndel
This now allows the user to set a new password for the cloud service. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22QML UI: Sort dives by dateGravatar Grace Karanja
Sort the dives by date, with the latest one appearing before the others. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22Add UI for cloud password changeGravatar Dirk Hohndel
This isn't hooked up yet, just the UI elements. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-22QML UI: Move DiveDetails to the StackViewGravatar Grace Karanja
Add a DiveDetails.qml to hold the dive details, and display it in the stack view when the user taps on a dive. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>