These files knowingly (one might say, intentionally) violate the spirit
and letter of the Debian / Ubuntu packaging rules. They are intended to be
able to create our own packages that include their own libdivecomputer,
libgit2 and (later) libmarble. Especially for daily builds this is WAY
easier than fighting with whatever may be the current version of these
packages in Ubuntu (especially since this allows us to use our private
libdivecomputer branch).
This assumes that the user runs the make-package.sh script from a
directory below which we have
subsurface/ <- Subsurface checked out git tree
subsurface/libdivecomputer <- desired libdivecomputer sources
subsurface/libgit2 <- desired libgit2 source
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The hw_ostc_device_eeprom_read / hw_ostc_device_eeprom_write functions
have bin in libdivecomputer since v0.1.0, so there was an error when the
read settings part ended up behind ifdef's.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixing incorrect variable scope. (I do not really see any functional
differences on Firefox, but better declare the variable before the
loop.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixes a warning. The function is only used if
DC_VERSION_CHECK(0, 5, 0) is defined.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds a context menu entry to add a setpoint change
event. In particular, this can be used to turn a logged dive into
a CCR dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In order to compile anything on Mac you need to have XCode and its command
line tools.
After an OSX update (as I just did to Yosemite) the command line tools
have to be reinstalled. Otherwise there are strange error message about
missing header files for libusb2 (even though that is still installed
via homebrew).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Some instructions how building libdivecomputer differs from Subsurface
build. And mention to copy libigt2 over to other repository if needed.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows more space between the input fields in the dialog.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The backend needs to convert the firmware and serial information into a
sane string - Subsurface shouldn't try to do this by itself.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch privides for writing CCR dive log parameters to a git
repository and for reading the data back from a git repository.
This involves writing and reading the following members of the
structures of sample:
o2sensor[3]
o2cylinderpressure
and dc->no_o2sensors.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Date and duration formats are not necessarily self explanatory so adding
tooltips to explain the expected format.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If manual CSV import does not have any dive number, give a default one
so that the dives get import and not silently ignored.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For each polygon that we paint we have to step through the
plot_info from the start again.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We when comparing floating points we do a relative comparison of the difference.
This fails when both numbers are (exactly) 0.0 which happens to occur when plotting
an O2 graph without o2 data resulting in both min and max for the y-axis to be 0.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Before you could 'Cancel' the edit and then would be asked if you wanted
to 'Discard' your changes or 'Cancel'. So clicking 'Cancel' cancelled the
action of having clicked 'Cancel'. That's so confusing, it's even hard to
explain. Yes, it uses "typical" language for user interaction and kind of
makes sense, but it's not easy to understand for the non-technical user.
With the new labels the user is asked to whether they want to 'Apply' the
changes or 'Discard' them. And when they choose 'Discard' the verification
question is still 'Discard' or 'Cancel'. That seems much more consistent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If not cylinder with type DILUENT or OXYGEN is defined, this function
returns -1 which should not be used as an index to an array. This
patch adds code to check for this return value and exit gracefully.
On line I marked with a comment. Someone more knowledgeable of that part of
code than me should double check that return is here what we want.
[Dirk Hohndel: fixed small oversight...]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clearly the static dialogs don't work. Even with the previous commit the
dialog still said "Save" insted of "Open". So let's just assemble our own
dialog and be done with it. I hope I got all the options right...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Using the SaveFile dialog to open a file caused it to ask the user if they
wanted to overwrite a file when they actually tried to open an existing
file. This fixes that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When dropping the pointless surface samples at the end of the dive we
stopped going through all the samples - for that reason the offset at the
end to find the data in the footer was wrong.
Now the extra data all seems to match what I can see on my screen after
the dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way we can specify file names that don't exist and therefore make our
git syntax (/path/to/dir[branch]) work.
Thanks to Tomaz for pointing this out.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a pain. We plan with segments but the plan shows waypoints.
If after a constant depth segment the gaschange (or setpoint chenge
for that matter) appears, the _next_ line should get the info
about the new gas (i.e. change _after_ the constant depth segment).
If, however, the gas is changed after a transition, the final waypoint
of the transition gets the gas printed.
And all is different for a verbatim plan, where the gas change is
an event rather than part of a segment.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixup_pressure() needs to calculate the cylinder pressures at the
start and at the end of the dive, also for CCR oxygen cylinders.
Since, in the case of CCR, the default cylinder is the diluent,
this is not automatically done for oxygen. This code provides
for fixup_pressure() to be able to do the calculations for oxygen
as well. Another change to fixup_dive() invokes fixup_pressure()
to calculate the values for the oxygen cylinder.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correct a bug that I introduced previously.
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
From 45570d66ecf238aec8997f5d0c20c01dfe0aa4fa Mon Sep 17 00:00:00 2001
From: willem ferguson <willemferguson@zoology.up.ac.za>
Date: Fri, 21 Nov 2014 14:59:14 +0200
Subject: [PATCH] Save-XML: Correct bug in cylinder gas parameters
Correct a bug that I introduced previously
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is not the right way to get serial numbers and firmware versions. The
libdivecomputer interface here is simply broken. Those ARE NOT numbers.
But until we have the capability in libdivecomputer to return reasonable
strings to us, this could be a stop gap measure to help us understand how
these are formatted.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>