summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-04-21Uemis downloader: adjust the threshold for stopping downloadsGravatar Dirk Hohndel
A complete batch of divelog and dive data takes about 20% of the available space (depending on how long those dives are). This is a hack and I can see this potentially going wrong, but the alternative is to be even more conservative and that has its own set of problems as it causes us to need more "unplug, wait, plug in again and restart" cycles. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21Uemis downloader: download additional dive data after every batchGravatar Dirk Hohndel
This looks like a fairly big change but it mostly just moves a block of code inside an earlier loop and adjust a few variables around it. The completely broken and insane Uemis download protocol distributes data across different "databases" on the dive computer. The "divelogs" are downloaded in batches of 10 (most of the time), and with this change every time one of those batches is downloaded we straight away get the matching "dive" entries. Hopefully this will avoid having the download abort (for lack of space) before all components are loaded. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21Uemis downloader: get the right values set before bailingGravatar Dirk Hohndel
This caused us to not read the auxiliary information for up to the last ten dives that were downloaded from the SDA. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21cmake: fix finding MarbleGravatar Dirk Hohndel
Silly bug. A lot of things in cmake are case insensitive. Some care about case. Stupid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Don't crash if add_gas_switch_event() gets called with invalid indexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: even with an empty divelist, check where to startGravatar Dirk Hohndel
If the user hits retry from within the download dialog, the dive list might still be empty but we still have to look for the best point to restart. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: allow continuing download by clicking RetryGravatar Dirk Hohndel
When we run out of space in the Uemis filesystem we return an error. The user could reasonably unplug the SDA, insert it again and then retry to continue the download (that's what we tell them to do). In that case we need to make sure we start at the correct dive otherwise the same dives keep getting downloaded over and over again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Download dialog: we can accept a partial download after an errorGravatar Dirk Hohndel
The dialog didn't accept "OK" and store the dives downloaded / selected so far if there had been an error. Especially with partial downloads from the Uemis SDA this is something that is quite reasonable to want to do, so allow exiting the dialog with OK even after an error. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: don't discard samples too earlyGravatar Dirk Hohndel
We do a good job in the fixup_dive() code to make sure we don't add long surface tails to the dives, so don't try too hard to guess the correct last sample in the Uemis specific code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-20Uemis downloader: avoid double freeGravatar Dirk Hohndel
A well intentioned attempt in commit ff860b3c044a ("uemis-downloader - resource leaks") to fix resource leaks actually introduced a bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: more consitent multi-line callsGravatar Lubomir I. Ivanov
- don't put anything on the first line after the opening "(" - fix indentation of the closing "(" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: use uppercase for defined macrosGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: fix message for NO_MARBLEGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: lowercase all built-in callsGravatar Lubomir I. Ivanov
e.g. SET() -> set() ELSEIF() -> elseif() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: generate clean ssrf-version.hGravatar Lubomir I. Ivanov
remoevs the extra white sapce in the generated ssrf-version.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: whitespace cleanupGravatar Lubomir I. Ivanov
- indentation - spaces near comments Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add LIBGIT2_FROM_PKGCONFIG and LIBDC_FROM_PKGCONFIGGravatar Lubomir I. Ivanov
These two new options allow usage of pkg-config to retrieve libdivecomputer and libgit2. For some reason the variables *_LIBRARIES have to be set to blank strings in the process, otherwise "-l" is passed to the linker. LIBGIT2_FROM_PKGCONFIG is a rename from PREFER_GIT_FROMSOURCE for consistency. The IF() check is also fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_MARBLE optionGravatar Lubomir I. Ivanov
If NO_MARBLE is set to ON, the MARBLE package is not seeked. If set to OFF the package is seeked, but if the find fails the gcc definition -DNO_MARBLE is set and marble is disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_TESTS NO_DOCS optionsGravatar Lubomir I. Ivanov
NO_TESTS: disable the tests NO_DOCS: disable the docs Both are set to OFF by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: fix bug when using system libgit2Gravatar Dirk Hohndel
Simple omission in commit 7596db28b5ad ("cmake: allow looking for optional libraries"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: add extra -lpthread to fix Ubuntu buildsGravatar Dirk Hohndel
We shouldn't need this. Ubuntu is once again broken. What else is new. But since this shouldn't hurt any of the sane Linux version, I'll just add it for any Linux flavor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-15build.sh: successfully build an App bundle on the MacGravatar Dirk Hohndel
Some install name magic on two of the libraries we build was necessary for things to work out correctly. And I added an install step to the default build that puts Subsurface in the install_root on other OSs and creates the Subsurface.app under subsurface/build/Subsurface.app on the Mac. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Add ability to undo removing of dives from tripsGravatar Grace Karanja
Add the functionality to undo/redo removing of dives from trips. The code calling remove_dive_from_trip has moved to the UndoCommands class. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14cmake: remove references to LRELEASEGravatar Tomaz Canabrava
This is being taken care by Qt5::LinguistTool Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14Show error messages for incorrect edit invocationGravatar Gehad elrobey
Planned dives must be replanned while manually added dives must be edited. Show error messages to handle wrong user input. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: try to find the macdeployqt programGravatar Dirk Hohndel
There is no variable for it, but we can abuse the variable that shows us where moc is located. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: improve test for variableGravatar Dirk Hohndel
CMake still confuses me. When testing if a variable was set it sometimes needs to want "DEFINED", but sometimes I need to compare it to an empty string. Let's do both (this seems to fix the problem I ran into) - but this is still weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: allow looking for optional librariesGravatar Dirk Hohndel
And use this to look for libusb. If it's there then libdivecomputer likely was linked against it. If it isn't then we don't need it, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the INSTALL file to reflect the switch to cmakeGravatar Dirk Hohndel
The cross building instructions for Windows are still lacking. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Update the mxe based sample scriptGravatar Dirk Hohndel
Working on making the different ways we build things more consistent Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09build.sh: use "install-root" for our local install destinationGravatar Dirk Hohndel
This seems less confusing then calling it just "install". Also adjust our cmake/Modules/Find... files accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Fix ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Allow the user to specify gas reserve.Gravatar Joakim Bygdell
Since most regulators have an intermediate pressure of 10bar the minimum value is 10 while the max is 99. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Recmode: Take safety stop into account when calculating ascent gas consumption.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Move the translations to it's own subfolderGravatar Tomaz Canabrava
By adding a new CMakeLists.txt file and configuring the translations inside of it's folder, the buildsystem will compile everything on that folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09Use Qt5Translations to deal with translationsGravatar Tomaz Canabrava
And remove the old code that did the same thing in a very complex way. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-09We use static library if we find - option was not being used.Gravatar Tomaz Canabrava
Currently we search for a static library and if we don't find it, we search for a shared library. If one of them is found, we return success but if none of them is found, error. So - A static library for libgit and libdivecomputer is preferred over the shared one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update build script to cross build Windows using mxeGravatar Dirk Hohndel
The MinGW based script is still there for reference, but that's no longer how I build the Windows binaries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update the packaging script to my latest versionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08When building from tar file, check .gitversion to get the correct versionGravatar Dirk Hohndel
Distribution builds on Linux tend to be made from tar files, not from git trees. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update the build rules for .deb based buildsGravatar Dirk Hohndel
With this we also give up on building daily builds on Ubuntu 12.04 The cmake based infrastructure very much assumes Qt5 at this point. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Update OBS spec file to current versionGravatar Dirk Hohndel
The old one was a) outdated and b) didn't work with cmake so it was rather misleading to have here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-08Remove the outdated and mislreading READMEGravatar Dirk Hohndel
It's been a LONG time since this was correct Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07cmake: fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07There's no need to search for a qmake anymoreGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Small changes to the build-scriptGravatar Tomaz Canabrava
- libgits version bump to 0.22 (0.21.5 didn't worked here) - call cmake in build.sh instead of qmake. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Make it compilant with the build scriptGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add FindLibdivecomputer.cmakeGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Add a FindLIBGIT2 based on our FindMarble.Gravatar Tomaz Canabrava
It currently searches for the .a (preferred) or the .so in the following directories, in order: ${CMAKE_CURRENT_SOURCE_DIR}/../libgit2, /usr/local, and /usr. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-07Simplify libgit handling on main CMakeLists.txtGravatar Tomaz Canabrava
We will use the OPTIONS variable to decide to find the .a or the .so, so there's no need to do checks here. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>