aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-04-04libdivecomputer.c: Split dive_cb() callback in twoGravatar Salvador Cuñat
dive_cb() needs a defined device to work as it's built for DC download tasks. Move part of the functionality of dive_cb() to a new function libdc_header_parser() which can be used to parse headers from raw data buffers with no device set. Obviously dive_cb() will call the new funtion for header parsing too. Two changes in logic: 1- In parse_gasmixes() set data pointer to NULL. This pointer is passed to the function, but it's not used. While this data pointer exists in DC import, via dive_cb(), it doesn't in file import as data has previously been set in the parser. 2- While parsing gas mixes do not return on rc = DC_STATUS_UNSUPORTED because it would end our dive parsing just if the device doesn't support gases, which seems undesirable in both, DC or file import. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Add errmsg() function for libdivecomputer.cGravatar Salvador Cuñat
Taken as is from libdivecomputer exaples/common.c to improve verbosity on libdc return codes. Intended to be used on error messages shown to the user on main window complementarily to those messages managed by dev_info(). Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Add dc_descriptor_t structureGravatar Salvador Cuñat
While downloading from DC the user sets the vendor and model. In imports, this is not possible. The parser has to figure out somehow at least the dive computer model used in a dive basis, as it can even change over time, and a log file can include several different models. We will use this structure in import tasks to ensure that data passed to libdc are consistent with what it expects to find. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Spelling correctedGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-04Take gas consumption into account for recreational modeGravatar Robert C. Helling
If there is valid gas information (cylinder size and starting pressure), also ascent before gas runs out (taking a 40bar reserve into account). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: make Windows binary a GUI appGravatar Dirk Hohndel
This way we don't get the annoying terminal window Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: correctly link against CoreServicesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-03cmake: build working Windows installer including all the DLLsGravatar Dirk Hohndel
Figure out the DLLs we need to include in the installer before building the installer executable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Only do safety stop of dive has at least max depth of 10mGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Checkbox and preference for safety stopGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Add 3min safety stopGravatar Joakim Bygdell
Fixes #839 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-02Introduce recreational planner modeGravatar Robert C. Helling
This adopts the planner to the needs of the recreational diver. Rather than immediately starting to ascent doing deco stops this mode, this mode stays at the last manually entered depth for the maximal time before mandantory stops appear (NDL). It does not change gas but keeps using the last used cylinder. TODO: * Grey out unused UI elements of the planner in this mode * Start ascent before gas runs out (or into reserve) * Do a 3min @ 5m safety stop. Fixes #840 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-01cmake: add installer target for creating Windows installerGravatar Dirk Hohndel
Silly cmake doesn't allow a target to depend on the install target. This ugly hack appears to be the recommended workaround :-( Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-01cmake: setup .nsi file when cross building for WindowsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: first stab at installing cross built Windows files into stagingGravatar Dirk Hohndel
From there it can then be assembled as an installer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: remove debug output that snuck into an earlier commitGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-31cmake: add Qt translation filesGravatar Dirk Hohndel
Not doing anything with them, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: create translations and correctly install themGravatar Dirk Hohndel
The previous attempt to install them was completely bogus as it only worked when the source directory had previously used for an in-source build using qmake. Oops. With this change we now create the translations in the build directory and install them from there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: fix Documentation build and installGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Make the image hashing non-blocking againGravatar Robert C. Helling
...it had become blocking with 1e3700c1 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Protect writing to image hashes with a mutexGravatar Robert C. Helling
Hopefully... Fixes #861 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Fix a bug in detecting CSV file contentGravatar Miika Turkia
NL should be set only if there is an empty line in the input file. That way the return if no empty line exists (simplistic test for Seabear CSV file) makes more sense. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30maintab.cpp: fix editing dive profiles from tripsGravatar Lubomir I. Ivanov
Once a manually added dive is part of a trip and this trip is edited, applying the modifications leaves the dive profile in edit mode (e.g. points can be dragged and gas swapping can be applied). The issue can be viewed from another angle. Why enable profile edits of a manually added dive which is in a trip, while the trip is being edited in the first place? If there are more than one manually added dives in said trip we are enabled to edit one of the dive but probably it's not intended to modify all manually added dives after the changes are applied for the trip. This patch disables the functionality in question and it also... Fixes #864 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30Manual added dives edit button is missingGravatar Gehad elrobey
once the manual added dive is added it can't be edited directly, This can be fixed by adding an edit button to the log menu, this will be consistent with the plan/replan buttons. Fixes #847 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-30cmake: implement "make install" for LinuxGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: make CMakeLists.txt more readableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: add CoreServices framework for MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: add support to compile for Windows and MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-26cmake: use DEFINED instead of comparing to ""Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake: setup marble link directory correctlyGravatar Dirk Hohndel
This way the necessary rpath settings are created Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake: handle libzip like the other librariesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25cmake cleanupGravatar Dirk Hohndel
- don't reference .so files, reference libraries - handle libdivecomputer just like the other libraries - add the ability to link libdivecomputer statically Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25Save more planner settings into prefsGravatar Gaetan Bisson
This adds to the prefs struct the variables last_stop, verbatim_plan, display_runtime, display_duration, and display_transitions from the planner so their values are saved from one session to the next. The widgets for some of those settings had default values in plannerSettings.ui; remove them since the new code in subsurfacestartup.c takes care of initializing them. Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25HTML: don't collapse the dive if hyperlink is clickedGravatar Gehad elrobey
fixes the wrong behaviour as dive details must not be closed when hyperlinks are clicking, So check for Hyperlinks before toggling the dive. Fixes #713 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25MultiFilterInterface - initilize member + remove extra ;Gravatar Marcos CARDINOT
initialize member 'anyChecked' in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25DivePlannerPointsModel::recalc - initilizes memberGravatar Marcos CARDINOT
Non-static class member recalc is not initialized in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-25DivelogsDeWebServices::multipart - initializes memberGravatar Marcos CARDINOT
Non-static class member multipart is not initialized in the constructor Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24Fix a memory leak in parser-xmlGravatar Claudiu Olteanu
Free the temporary memory alocated for a cobalt location. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24Clean req.txt file pathGravatar Claudiu Olteanu
This patch cleans the path allocated for req.txt file path. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24Fix memory leaks on Cochran fileGravatar Claudiu Olteanu
Free the buffer before terminating the process. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24Remove some white spacesGravatar Claudiu Olteanu
Make this code compliant with CodingStyle Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-24Resolve some memory leak on datatrak sourceGravatar Claudiu Olteanu
The result of byte_to_bits should be freed by the caller. This patch frees the memory allocated by that function. Also there were some memory leaks in data_import and read_file_header functions when an error occured. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Improve error managementGravatar Salvador Cuñat
Show error messages in main window, instead of stdout. Use translated strings. Remove redundant error message. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23CodingStyle: add an extra line for the braces explainationGravatar Lubomir I. Ivanov
The extra call "dosomethingelse()" is added with the intention that user will not be confused to add braces around single lined "if" conditions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Update CodingStyleGravatar Dirk Hohndel
Initializers were not documenting what we actually do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Import support for new Seabear formatGravatar Miika Turkia
This add support for Seabear's new import format that is used by H3 and T1. In the future also the Hudc should switch to the new format. The main difference to the old one is that time stamps are no longer recorded in the samples, but intervali is specified in the header. The header contains other useful information as well that we should build support for. E.g. surface pressure, gas mixes, GF, and mode might be useful additions later on. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23Fix Seabear new line detectionGravatar Miika Turkia
We need to take both \r\n and \n new line formats into account before failing Seabear validity check on import. (Seabear file has empty lines, if import file does not have one -> return.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23File.c - Missing break in switchGravatar Marcos CARDINOT
Simple control flow issue. Missing break in switch. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-23load-git::walk_tree_file - missing break in switchGravatar Marcos CARDINOT
Let's be consistent and avoid potential future bugs. Signed-off-by: Marcos CARDINOT <mcardinot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-21Implement handler for cancel button of Save As dialogGravatar Claudiu Olteanu
When an user opened the "Save as" dialog and pressed the cancel button a null string was returned. Therefore the file_save_as function returned an error which was lately shown when the file_save function was called. Now the function checks if the cancel/exit button was pressed and returns. Fixes #844 Reported-by: longjohnsilver Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>