summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-12-06Cloud storage: do not store the actual pictures in gitGravatar Dirk Hohndel
Adding pictures to the repository was a big mistake on my part. It's very easy for the git repositories to reach a gigabyte and more making sync times (and especially "first download" times) completely unreasonable. This doesn't solve the problem for existing repositories (as the pictures are already there, in the git history), but at least it prevents us from storing more pictures out there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Prevent gaschange tank icons from using garbage coords.Gravatar K. \"pestophagous\" Heller
Tank icons were shown at incorrect spots on the profile when the DiveEventItem object held a pointer to a struct event even after the struct event at that address had been freed. When internalEvent is a pointer to freed memory, internalEvent->time.seconds could have all kinds of crazy values, which get used in member function DiveEventItem::recalculatePos to place the tank at bad x coordinates. The DiveEventItem(s) no longer store a pointer to memory that they do not own. This way, no matter how the path of execution arrives into slot recalculatePos, we never need fear that the DiveEventItem will dereference a garbage pointer to a struct event. Fixes #968 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: ignore leading junk in the dataGravatar Dirk Hohndel
One user's debug log shows valid data, only not in the format we've seen before (with the response starting with '{'). Instead he gets a repeat of the second word in the response to processSync prepended to the expected output. So let's skip the data until the first '{'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: don't leak memoryGravatar Dirk Hohndel
Don't just clear out the buffer pointer, free the memory, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06User manual: add missing empty lineGravatar Dirk Hohndel
This way the ASCIIDOC works as expected and creates the numbered list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Don't overwrite air temperatureGravatar Dirk Hohndel
If we already have an air temperature set, don't overwrite it with potentially less accurate infromation from the first sample. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Location completion matches on whole nameGravatar Dirk Hohndel
When typing in a partial location name, the match now considers the whole text, not just the start of the text. So typing in "Yell" will match both "Yellow House" and "Mellow Yellow". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Only close html tags if they were opened beforeGravatar Robert C. Helling
The runtime html table is printed only if printing a verbatim diveplan is disabled. So the closing tags should be printed only in that case. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Last set of updates to the user manual in this roundGravatar Wendie Fisher
Once again focus on language and readability. Signed-off-by: Wendie Fisher <wendie@divedad.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06subsurfacestartup.c: leave free_prefs() emptyGravatar Lubomir I. Ivanov
There is a bug on OSX where free() is called on non-allocated memory in free_prefs(). Most of the preferences are not freed in free_prefs() while copy_string() is used on them, so let's not free() any pointers in free_prefs() and leave them as one-time leaks. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06planner.c: fix 'disclaimer' pointing to stack memoryGravatar Lubomir I. Ivanov
In add_plan_to_notes() the 'disclaimer' is set to the temporary buffer 'buf'. By making 'buf' static, 'disclaimer' now points to a persistent buffer. Bug was reported as bad characters when printing the planner deco text. Reported-by: Stefan Fuchs <sfuchs@gmx.de> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Next batch of language updates for the user manualGravatar Wendie Fisher
Signed-off-by: Wendie Fisher <wendie@divedad.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Statistics tab: clear min/max duration with just one dive selectedGravatar Dirk Hohndel
Otherwise if the user selects more than one dive, then goes back to just a single dive, the maximum and minimum duration of the previous selected group of dives stays visible which is clearly incorrect. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: more debug outputGravatar Dirk Hohndel
Once again compile time enabled. I guess it would be nice to turn this into a logfile (just like we have with the libdivecomputer backends). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: recover if dive info is completely missingGravatar Dirk Hohndel
I user had a Uemis that had a dive log entry for a certain internal id but no dive info for it. This appeared to be one of those dreaded dives when the Uemis decides to start a dive at the end of a flight and then stays in dive mode until it runs out of battery. Anyway, if we see a number above and a number below, just give up and move on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: deal with a whole block of deleted divesGravatar Dirk Hohndel
If every dive in a download block from the Uemis was deleted we kept downloading that same block of dives. With this we remember how far we got even if the dives ended up being deleted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Update Mac bundle build & sign scriptsGravatar Dirk Hohndel
These are mostly a convenience for me, they'd obviously have to be updated for someone else trying to use them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Uemis downloader: print some information on stderr in verbose modeGravatar Dirk Hohndel
On the Mac the info on the download dialog isn't shown. So print it on stderr as well when in verbose mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Don't crash if we have no WindowTitleUpdater registeredGravatar Dirk Hohndel
Subsurface-mobile doesn't have a window title with the name of our file name at this point, so simply don't try to trigger the update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Updates to the user manualGravatar Wendie Fisher
Small changes to the language to make it easier to read. Signed-off-by: Wendie Fisher <wendie@divedad.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06NSIS: add a couple of uninstaller checkboxesGravatar Lubomir I. Ivanov
Add a new dialog/page which is shown right before the final "uninstall" click. The dialog may contains two checkboxes - for registry entries and for the user path. These checkboxes will not be created if the user has not run the application yet, as no registry keys will be available. Selecting the user directory checkbox shows a warning message box, that the user should make sure no important files are present there. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Only include samples with data on UDDF importGravatar Miika Turkia
According to the specification each proper sample should have depth, so we can just ignore the empty waypoints. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06subsurfacestartup.c: don't double free 'default_filename'Gravatar Lubomir I. Ivanov
'default_filename' is obtained from system_default_filename() but system_default_filename() returns a static pointer the HEAP memory of which is handled in main(). Remove the free() for 'default_filename' free_prefs() to prevent a double free(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Grab all gas mixes only when no tank data is givenGravatar Miika Turkia
Grabbing all gas mixes was added for Xdeep default cylinders, and it is not required for other data sources that have tankdata info in the UDDF file. See #958 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Don't overflow cylinder array in xml parsingGravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06Give proper error message when no dives on a zipGravatar Miika Turkia
We import a few logs that are archived in a zip file. E.g. divelogs.de import is a zip file named with .dld extension. In case the zip file is empty, we should return an error message that states that fact, not parse error. This will also end the input file parsing cleaning up the error message on the console. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-27Getting ready for 4.5.1v4.5.2v4.5.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-27Pull latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Make libtool versioning happyGravatar Dirk Hohndel
This way we find the versioned libdivecomputer.dll Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Cmake: fix incorrect modification of a QT_LIBRARIESGravatar Dirk Hohndel
It's a list, not a string. Treating it as a string creates all kinds of exciting weird errors that make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Build Windows installer with shared libdivecomputerGravatar Dirk Hohndel
Since we ship it all in one piece there is no reason to use a static libdivecomputer (like there is on Linux). This allows us to give the user a different libdivecomputer.dll for testing when tracking down a bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Build libzip with cmake when cross building for WindowsGravatar Dirk Hohndel
This seems to fix our issues with being able to create zip files on the fly (needed for the divelogs.de access). Fixes #955 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-27Remove unnecessary Q_INTERFACES declarationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Allow building with both libzip 0.11.x and 1.0.xGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Fix building without BT supportGravatar Dirk Hohndel
I guess no one had tried this in a while. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26Some error reporting on divelogs.de exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Report error received from zip_closeGravatar Dirk Hohndel
We may want to hide the error text in a release build and replace it with something more user friendly but then again, the next time this fails on us at least our users can report more than "doesn't work"... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Divelogs.de upload: report error when unable to open upload fileGravatar Dirk Hohndel
Silently failing is not cool. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25List latest changes in ReleaseNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Move informational output to only be shown in verbose modeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Interpolate depth for samples that have no depthGravatar Linus Torvalds
When downloading from libdivecomputer, we used to initialize the depth of a sample to the previous depth. However, at least for the Suunto EON Steel, you can get sample times without any actual depth reading - the time might be associated with some ranbdom event rather than a new depth sample. Rather than initialize these samples to have the same depth as the previous one (and then perhaps getting a very sudden jump when the *real* depth event comes in a second later), initialize the depth samples to -1, and if that sample doesn't get a real depth, we'll create an interpolated depth. It is possible that we should just carry the sample around as not actually having a depth, and instead just interpolate in the plot_info generation, but at least right now we have a ton of code that "knows" that every sample has a depth. Not the least of which is our own save format. So generating an interpolated depth seems the path of least resistance, and at least makes the graph look correct - no odd staircase effect from other events that happen in between depth samples. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Use neutral color for "no SAC information"Gravatar Dirk Hohndel
In commit 31d1d1f4217c ("Don't change pen color when for zero SAC") Robert continues to use the last SAC color (which certainly was better than switching to dark green for "extremely low SAC rate"). But I think it makes even more sense to mark it as neutral - so I picked a gray. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25Fix location edit UI issue on MacGravatar Dirk Hohndel
For some reason the Mac doesn't create an "activated" signal when hitting enter/return on the drop down. So we simply manually send this and now you can select the site with enter/return just like on Linux or Windows. Fixes #953 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-24Divelogs.de export: split location on slashGravatar Miika Turkia
As we join LOCATION with SITE on divelogs.de import using slash (/) as a separator, we might as well split on last slash on export. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-24Merge branch 'for_dirk' of https://github.com/atdotde/subsurfaceGravatar Dirk Hohndel
2015-10-23Don't change pen color when for zero SACGravatar Robert C. Helling
When for individual plot entries the SAC is zero this comes from gas changes and the SAC calculation needing a bit more pressure data and not from the diver switching to freediving mode. So we shold not change the pen color on the pressure line for that but pretend we are still breathing at the previous SAC. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-10-23Fix the momentary SAC calculation for the profile coloringGravatar Linus Torvalds
There was tons wrong with the code. You can't just average the SAC rate over different plot entries, since they may not be the same duration. And it got the beginning and end conditions wrong etc etc. This should at least get much closer. And it's structured to be a lot more understandable, I hope, even if the math is a bit more involved (ie doing the proper time-pressure integration etc). It may still have bugs, but at least it now gets the right coloration at the beginning of a dive, and just eye-balling the slope vs color it seems to do the right thing. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-10-23Latest strings for translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23Add missing tr() implementationsGravatar Jan Mulder
One specific string did not translate. First, Dirk and I (via IRC) suspected a leading space was the issue (see commit eccac1321f512d8). However, I found out that the problem was still there. A non translated string "%1 shown", when applying a filter on the divelist, and looking at a trip line. It shows always untranslated "%1 shown". Extracting to-be-translated strings from the code, I found 2 errors: Class <classname> lacks Q_OBJECT macro. This patch adds a missing tr() definition and implementation to 2 structs. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23Fix broken translation in divelistGravatar Jan Mulder
Fixes a broken translation in the divelist introduced in commit 45b1d0d73db6e21. Now, the (.. dives) string on a trip line in de divelist is translated (again). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>