Qt5 Supports Components, which means that we can list the
components we need to find, instead of specifying one for
each line.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While I don't need this when building on Fedora 20, OBS builds for
openSUSE appear to fail without this. Strange.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Back in 5bf23381e we started storing planner settings in prefs.
We need to read those settings back when we start the planner.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With the addition of gas reserves in recreational mode
we need to make sure that the first leg is short enough
that we have more gas left than the specified reserve
even when using small cylinders like LP72.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is still not something I'm 100% sure I got right. But at least now it
correctly rebuilds the .qm files...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This script likely is useless for anyone but me, but I like having it in the
source tree in case others can benefit from seeing how the packages are built.
This now is based on out-of-tree cmake builds.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't try to install the TARGET into the Subsurface.app or we get a neat
infinite recursion. As a bundle cmake does all these things automagically.
Right now the version is hard coded which is ugly but since it's determined in
a separate cmake file it seemed non-obvious how to do this right...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The cmake keywords still confuse me at times.
A custom target is always recreated. How silly. But the correct (I think)
implementation is actually easier...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I guess I should add the code to move that app to /Applications but I never use
it this way... not sure how many people really install from source on a Mac,
anyway.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When building on a Mac for some reason I was getting an empty translation file
name (and therefore and entry that was the whole directory and not a
translation file. This is a bit clumsy but it fixes the problem.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 39ffb0fced ("Fix Subsurface build with Qt 5.4.1 and later") Thiago
was a bit too aggressive removing some of our ifdefs for building with older
versions of the SDK...
I need at least this patch to still build on the machine that I use to create
the official binaries.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adds two test dives for OSTCTools.
I've kept the original naming.
Num 173 selected because it implies using EAN32.
Num 80, provided in forum by Philippe Tescari, selected because involves
gas changes (although user don't seems to have set different gas mixes).
Sadly, both dives seems to be from 2N/C devices.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
data pointer is not used, so it can be safely removed.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
OSTCTools is a windows based software by Robert Angeymar which performs
configuration upgrade, memory analysis and download tasks for H&W OSTC
devices.
Downloaded dives are stored in files (one archive each) with the raw
binary data heavily padded at the begining of the file, and some other
data not included in H&W dive header protocol as the device's serial
number.
The import function simply takes the raw data part of the file and lets
libdivecomputer do the parseing.
Then adds some additional info as OSTC reported dive number and serial
device number.
Please note that OSTCTools is *not* a real logging software, it simply
gets the DC raw data, so there isn't any information about dive site,
equipment and so.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Move extern declaration of function datatrak_import() to file.h, where it
fits better than in file.c
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add function libdc_buffer_parser() intended to parse raw data buffers
prepared for libdivecomputer. We have to commit elsewhere the necesary
assembly tasks to achieve consistent data.
Actually only OSTCTools import makes use of this feature. Uwatec families
have been included as I expect to make use of this function for sample
parsing in datatrak import (and, may be in a far future, smartrak).
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>