aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-07-18Android Docker: make a nice version tag fileGravatar Jan Mulder
Trivial. The final touch command was missing the proper quotes, so it created a bunch of strangely names files from the date command. Just good for the developers that like to peek into the docker image. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-07-18Android: hack around the build issue with a custom containerGravatar Dirk Hohndel
Local testing seems to indicate that the build should work with this container. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-18Android: Switch to Qt 5.12.4 containerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-18Android: rework build of OpenSSL to get it to build link and runGravatar Jan Mulder
This is squashed commit consisting of a number of subjects, all intended to get our app to build, link and run on device, but as the steps are small (but non-trivial), I document them in this one commit. 1) Do not use OpenSSLs install targets, but simply copy the wanted build artifacts manually. The main reason for this, is that the install targets want to install a lot more than we build, so it also builds parts of the OpenSSL suite that we will never use. 2) As Android does not like shared libraries with embedded versioning (and the used androiddeployqt actively prevents adding versioned libraries to the build), strip all this data from the generated shared libraries. This trick was already there, but its adapted to all possible conflicts. 3) The OpenSSL config script seems rather broken, resulted in failed builds, and calling the underlying Configure is simpler. 4) Finally, parts of the OpenSSL code uses stdio things like stdout, stderr, etc. These showed up as undeclared external on build time. Well, luckily, there was an easy way out using 2 -D(efines). This feels hacky, but does the job (and we are not interested in the output of OpenSSL in our app). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-07-18Android: Qt 5.12.4, OpenSSL 1.1.1cGravatar Jan Mulder
The main reason for upgrading of the Qt version is the hunt for a broken BT/BLE stack, preventing downloads from BT/BLE enabled DCs, in relation to arm64 architecture builds. (And the absolute need for an arm64 build in relation to the publication of the Android app in Googles Play store). In addition, Qt 5.12.4 starts supporting OpenSSL 1.1.1c, and trying to use our current OpenSSL 1.0 series is highly discouraged by Qt (and OpenSSL itself). So, upgrade both in unison. But ... be careful bisecting issues on this commit, as it does break our build. That will be fixed in the next commit. This fixes the BT/BLE download for arm64! Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-07-18Android: newer version of Gradle pluginGravatar Jan Mulder
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>
2019-07-18Cleanup: remove unused weightsystem_none() functionGravatar Berthold Stoeger
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>
2019-07-18Core: dynamically resize weight tableGravatar Berthold Stoeger
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>
2019-07-18Core: Implement same_weightsystem() function to compare weightsGravatar Berthold Stoeger
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>
2019-07-18Cleanup: declare functions in profile.h as externGravatar Berthold Stoeger
We seem to do this in other C-headers, so for consistency also do it here. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-18Cleanup: make the plot-pressure type an enumGravatar Berthold Stoeger
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>
2019-07-18Cleanup: introduce function to set pressure valuesGravatar Berthold Stoeger
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>
2019-07-18Cleanup: update comment in core/gaspressures.cGravatar Berthold Stoeger
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>
2019-07-18Cleanup: replace pressure reading macros by inline functionsGravatar Berthold Stoeger
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>
2019-07-18Cleanup: turn GET_PRESSURE macro into inline functionGravatar Berthold Stoeger
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>
2019-07-18Cleanup: remove non-existing pressures in debug_print_pressures()Gravatar Berthold Stoeger
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>
2019-07-18Cleanup: remove unused macro SAC_WINDOWGravatar Berthold Stoeger
Last user was removed in ae1e9b11a537eb0ba9b649cb876dae4cc4628045 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-18Cleanup: Remove unused function calls in main tabGravatar Berthold Stoeger
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>
2019-07-18Cleanup: remove includes from qthelper.hGravatar Berthold Stoeger
To reduce interdependencies, remove the dive.h and divelist.h includes in qthelper.h Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-07-18Cleanup: move deco function declarations to deco.hGravatar Berthold Stoeger
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>
2019-07-18Cleanup: remove includes from qt-models/models.hGravatar Berthold Stoeger
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>
2019-07-18Cleanup: fix include weirdness concerning string_to_*() functionsGravatar Berthold Stoeger
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>
2019-07-18Cleanup: move cylinderuse_from_text() to equipment.cGravatar Berthold Stoeger
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>
2019-07-16Latest translationsv4.9.0Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-15Update list of supported dive computersGravatar Dirk Hohndel
The last minute libdivecomputer update brought in a new support dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-15update parse-descriptor.plGravatar Dirk Hohndel
libdivecomputer is a submodule. Just hardcode the path to descriptor.c. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-15Bluetooth: recognize Ratio iX3m GPS dive computersGravatar Dirk Hohndel
We cannot tell them apart by Bluetooth name, so pick one of the names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-15Update libdivecomputerGravatar Dirk Hohndel
- 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>
2019-07-14Fix up XML saving of remaining bottom time dataGravatar Linus Torvalds
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>
2019-07-14Fix cylinder gas type saving when we have bogus gas use dataGravatar Linus Torvalds
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>
2019-07-13Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13Update Subsurface-mobile version numberGravatar Dirk Hohndel
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>
2019-07-13Prepare for 4.9 releaseGravatar Dirk Hohndel
Update supported dive computers, README and ReleaseNotes Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13user manual: update the bundled html versionGravatar Dirk Hohndel
And fix the date to say July. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-07-13Fixed filter scrollarea not adjusting to parent heightGravatar Doug Junkins
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>
2019-07-13Fix special case for temperature in CSV exportGravatar Miika Turkia
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>
2019-07-12Updates to user manual (update 3 of 3)Gravatar willemferguson
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>
2019-07-12User manual: updates to undo descriptionGravatar Dirk Hohndel
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>
2019-07-12Profile: stop animations on exportGravatar Berthold Stoeger
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>
2019-07-12Profile: store animation speed in profile objectGravatar Berthold Stoeger
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>
2019-07-12Profile: add speed parameter to Animation::* functionsGravatar Berthold Stoeger
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>
2019-07-12Profile: take int instead of bool in DiveEventItem::recalculatePosGravatar Berthold Stoeger
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>
2019-07-11Desktop: clear notes on empty diveGravatar Berthold Stoeger
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>
2019-07-11Thumbnailer: improve error messageGravatar Berthold Stoeger
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>
2019-07-11Preferences: warn if ffmpeg can't be loadedGravatar Berthold Stoeger
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>
2019-07-10Git: handle excess of cylinders or weightsystems gracefullyGravatar Berthold Stoeger
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>
2019-07-09Desktop: update BT selection when picking remembered dive computerGravatar Dirk Hohndel
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>
2019-07-06Update user manual (2 of 3)Gravatar willemferguson
Small updates and corrections to existing text Replaced four images to reflect the current UI Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2019-07-06Cleanup: call calculate_max_limits_new() in create_plot_info_new()Gravatar Berthold Stoeger
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>
2019-07-06Cleanup: fix memory management of the plot dataGravatar Berthold Stoeger
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>