Using more recent versions of the Android NDK results in a build failure
saying something like "No toolchains found in the NDK toolchains folder
for ABI with prefix: mips64el-linux-android". Mips support went away
after Android NDK, Revision r17c, and we are using r18b at this moment.
Too old Gradle stuff gets confused by this.
The solution is simple. Use a newer version of the Gradle plugin.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This function was used to count the number of weightsystems
used in a dive. Since the weightsysems are now collected
in a dynamic table it became unused. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Replace the fixed-size weightsystem table by a dynamically
relocated table. Reuse the table-macros used in other parts
of the code.
The table stores weightsystem entries, not pointers to
weightsystems. Thus, ownership of the description string is
taken when adding a weightsystem. An extra function adds
a cloned weightsystem at the end of the table.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This will be used later when joining and editing dives.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Sadly, this doesn't give any type safety. But at least it documents
the function arguments.
Make the last item in the enum as a number-of-pressure-entries
sentinel. Use that to size the pressure-values array.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Instead of assigning the the lvalue of the SENSOR_PRESSURE
macro, introduce a general function to set pressure values.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The comment to populate_pressure_information() was mentioning
gas pressures that didn't exist. Remove these parts.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Replace the INTERPOLATED_PRESSURE and SENSOR_PRESSURE macros by
inline functions. Generate a common inline function that reads
a pressure value for a dynamic sensor.
Not all SENSOR_PRESSURE macros can be replaced, because the
macro is also used to set the value and C sadly doesn't know
the concept of "return reference from a function".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
There is absolutely no reason to use a macro here.
The only argument that can be made is consistency with
the other pressure-macros, but those too are questionable.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
DILUENT_PRESSURE and INTERPOLATED_DILUENT_PRESSURE do not exist
anymore. No point in trying to output them.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
per_cylinder_mean_depth() and selected_dives_gas_parts() are used
in the dive-information and statistics tab, respectively. Nevertheless,
these functions are called on the main tab as well and the result is
trashed. Therefore remove the calls. Must have been an artifact.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Another tiny step in making dive.h smaller: move function
declarations to deco.h if these functions are defined in deco.c
and don't directly concern dives.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
qt-models/models.h included dive.h and divelist.h. Remove these
unnecessary includes, to reduce interdependencies. A drop in the
bucket, for sure.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The string_to_*() functions were declared in dive.h and qthelper.h.
Moreover in one file they were declared with C in the other with
C++ linkage. This only works because qthelper.h includes dive.h
first.
Fix this anomaly by declaring the functions only in qthelper.h,
but moving them from the C++ to the C part.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Since this function doesn't act on a dive and is only related
to cylinders, move it to equipment.c and equipment.h.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
- Add support for the Aqualung i550C
- Update Ratio iX3M GPS naming and note that they support rfcomm
- misc cleanups
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While testing the cylinder type saving fix, I noticed that the RBT
saving was broken. Instead of saving RBT whenever it changed, we'd save
it when it was non-zero. Which doesn't match the git save format, and
also doesn't match what we do when loading an xml file (where we default
to the previous RBT value, and a sample RBT will modify it).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Steve Williams reported a crash when saving a previously loaded dive as
xml, and gave a gdb backtrace.
It turns out that if we can't parse the cylinder use type (OC, diluent,
oxygen, unused) we initialize the cylinder use to an invalid type, and
then when we save it, we mess up.
Fix it up by doing proper limit checking before accessing the
"cylinderuse_text[]" array when saving.
Reported-by: Steve <stevewilliams@internode.on.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The mobile changes are far and few, but the next version will be the
first to support arm64, so a new minor number seems appropriate.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Changed the Qt Layout for FilterWidget2 to "Lay Out on a Grid" to
allow the scrollarea to adjust when the height of FilterWidget2
changes. Fixes issues #2174.
Signed-off-by: Doug Junkins <junkins@foghead.com>
The old code took air and water temperatures primarily from
dive/divetemperature or secondarily if the previous one didn't have
either one of them from divecomputer/temperature. The new code attempts
to take first air temperature from dive/divetemperature or
diveomputer/temperature and then on a separate run the water
temperature from these both. Thus we should be fine if one temperature
is in dive/divetemperature and the other in divecomputer/temperature.
Fixes#2169
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Replace four images in section 5.2.5
Update text to reflect the undo mechanism. This mostly involved removing
obsolete text.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
And some trailing space removal.
The text on editing dives hopefully is more accurate and easier to understand.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The plotDive() function had a flag to plot pictures asynchronously.
This was used on export. Rename this field to "instant" and disable
animations when set. This should make sure that the axes are properly
exported.
Fixes#2170
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
When exporting dive pictures we don't want animations. Therefore,
store the animation speed in the profile object to avoid nasty
hacks with the preferences.
This actually removes such a hack. Pictures and tooltips for now
still use the values stored in the preferences, because their
animations happen only on user-interactions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
For now always use the preferences value, so that this is a
no-op. This is a preparation for storing the speed in the
profile widget.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The goal here is to slowly make animation speed a variable of the
profile widget, not of the global preferences. Currently the code
does some trickeries with setting / unsetting the global animation
speed.
Start by not taking a bool "instant" but a speed in
DiveEventItem::recalculatePos().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
If no dive is set, all fields except the note field were cleared.
Also clear notes.
Fixes#2172
Reported-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In the error messages shown when failing to start ffmpeg, instruct
the user to set the correct executable in the preferences.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In the preferences widget warn the user when they enter a non-executable
path to ffmpeg. Thus they don't have to start thumbnailing just to
find out that the path is wrong.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Currently, the git parser happily trashes memory if a git repository
contains too many weightsystems or cylinders. This should only happen
in testing, but nevertheless try to handle it gracefully and ignore
excess cylinders / weightsystems.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
When switching to a BT dive computer, the device selection dialog is opened,
when switching away from BT, the device address is set.
Fixes#2139
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Small updates and corrections to existing text
Replaced four images to reflect the current UI
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
All callers of create_plot_info_new() called calculate_max_limits_new()
a line before. Thus, simply call the latter in the former.
This allows us to automatically free the plot data in create_plot_info_new().
The old code overwrote the corresponding field with NULL.
As a side-effect, this removes a bogus static variable.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
There was a global variable last_pi_entry_new, which stored the
recently allocated plot data. This was freed when new plot data
was generated.
A very scary proposition: You can never have two plot datas at
the same time! But exactly that happens when you export for
example subtitles.
The only reason why this didn't lead to very crazy behavior
is that at least on my Linux machine, the calloc() call would
just return the previously freed memory.
Fix this mess by removing the global variable and freeing the
data in the callers.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>