aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-10-11desktop: fix div-by-zero when selecting multiple invalid divesHEADmasterGravatar Tim Segers
Signed-off-by: Tim Segers <tsegers@pm.me>
2021-10-11Ignore invalid dives in subsurface-mobile dive summaryGravatar Tim Segers
Match subsurface-desktop's invalid dive behavior Signed-off-by: Tim Segers <tsegers@pm.me>
2021-10-09Update translations and source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-10-01Don't access gasmix.o2.fractionGravatar Robert C. Helling
Air is a special gas that does not contain oxygen according to gasmix.o2.fraction. If you want to use the fo2, you need to use get_o2() to treat this special case correctly. This fixes a bug when setting the MND of a gas containing 21% oxygen when o2 is considered not narcotic. Reported-by: Christoph Gruen <gruen.christoph@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2021-09-27mobile: restore dev_info displayGravatar Dirk Hohndel
In commit 105b60389c ("mobile: remove GpsLocation reference from qmlmanager") I was a bit careless with the code removal and unintentionally also removed the initialization of the progress callback. With this change the updates from the download process are once again shown on screen in the mobile app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-22core: don't write pressure samples with "no sensor"Gravatar Berthold Stoeger
This has led to broken XML files, don't do it. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-22core: properly clear pressure data of invalid sensorsGravatar Berthold Stoeger
When we found an invalid sensor (referring to a non existing cylinder) in fixup_dive() the sensor-id was set to NO_SENSOR. This led to invalid XML files, because the code decides to switch into legacy mode. However, there are two pressure readings, which is invalid in legacy mode. Therefore, also clear the pressure data. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-22desktop/image-time-shift: use better filename filterGravatar Dirk Hohndel
We already have a function to select all supported image formats. Let's just use that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-22desktop/image-time-shift: reorder UIGravatar Tim Segers
The camera sync feature has been moved above the Ok and Cancel buttons and given its own descriptive header. The checkbox to ignore unaligned image timestamps has been moved closer to the buttons. Signed-off-by: Tim Segers <tsegers@pm.me> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-22desktop/image: allow larger range for manual time shiftGravatar Dirk Hohndel
The QTimeEdit field is severely limited when it comes to the supported time range. By coding our own input / validation we can allow far larger time shifts. For simplicity, this always assumes hours:minutes format. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-22desktop: add support for camera sync delta of more than 24hGravatar Tim Segers
When using the camera sync feature to sync media to the dive timeline, the calculated time difference was considered invalid if it was more than 24 hours. To prevent this, this commit disables the manual time offset input fields when the camera sync button is clicked. It then uses the epoch difference in the final offset calculation, enabling arbitrary time differences between camera and divecomputer. Signed-off-by: Tim Segers <tsegers@pm.me> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-20core: remove superfluous argumentsGravatar Dirk Hohndel
Fixes CID 373231 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-19Re-do the libdivecomputer fingerprint save/load codeGravatar Linus Torvalds
This tries to make our fingerprinting code work better, by avoiding using the "deviceid" field that has always been unreliable because we've calculated it multiple different ways, and even for the same version of subsurface, it ends up changing in the middle (ie we calculate one value initially, then re-calculate it when we have a proper serial number string). So instead, the fingerprinting code will look up and save the fingerprint file using purely "stable" information that is available early during the download: - the device model name (which is a string with vendor and product name separated by a space) - the DC_EVENT_DEVINFO 32-bit 'serial' number (which is not necessarily a real serial number at all, but hopefully at least a unique number for the particular product) but because the model name is not necessarily a good filename (think slashes and other possibly invalid characters), we hash that model name and use the resulting hex number in the fingerprint file name. This way the fingerprint file is unambiguous at load and save time, and depends purely on libdivecomputer data. But because we also need to verify that we have the actual _dive_ associated with that fingerprint, we also need to save the final deviceid and diveid when saving the fingerprint file, so that when we load it again we can look up the dive and verify that we have it before we use the fingerprint data. To do that, the fingerprint file itself contains not just the fingerprint data from libdivecomputer, but the last 8 bytes of the file are the (subsurface) deviceid and the diveid of the dive that is associated with the fingerprint. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-13Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13build-system: update translation source scriptGravatar Dirk Hohndel
Kirigami sources are now under 3rdparty. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13Android: hardcode permissions and don't ask for featuresGravatar Dirk Hohndel
That seems to be the way to force it to not request FINE_LOCATION or GPS access. If I leave this on 'auto' then the dependency on QtPositioning (for showing the map) appears enough for it to claim access to GPS location. I no longer want to deal with the Google Play police for that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13documentation: remove location service reference from mobile manualGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13iOS: don't request GPS permission anymoreGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13core: remove location service preferencesGravatar Dirk Hohndel
Including the related tests. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove GpsLocationGravatar Dirk Hohndel
Only used in context of acquiring GPS locations with the mobile app, which we no longer do. Keep the DiveAndLocation structure around as that's needed by the ApplyGpsFixes command. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove GpsLocation reference from qmlmanagerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove locationService interfacesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove hasLocationSourceChanged interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove logText propertyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove deleteGpsFix interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove applyGpsData interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove copyGpsFixesToClipboard interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove clearGpsData interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove getCurrentPosition interfaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove GpsListModelGravatar Dirk Hohndel
This is only needed to show the list of GPS fixes obtained with the now removed location service. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove GPS list UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove current location checkbox from dive editGravatar Dirk Hohndel
Since we no longer access the device location, we can't do that any longer, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove long disabled planner UIGravatar Dirk Hohndel
This was never functional. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-13mobile: remove GPS related item in main mobile UIGravatar Dirk Hohndel
Given the nonsense that Google and Apple makes us go through in order to support this feature, it's time to cut our losses and walk away. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-07Adding changelog entry for rich text supportGravatar Josh Torres
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
2021-09-07Support rich text on mobile notes fieldGravatar Josh Torres
When viewing dives on mobile the notes field does not support rich text. User formatting, output from the planning feature, etc will render html as plain text. Adding qml tag to support rich text Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
2021-09-06Add changelog entryGravatar Josh Torres
Signed-off-by: Josh Torres <torres.josh.j@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-06core: fix off-by-one causing incorrect profile displayGravatar Josh Torres
In commit 4724c88 get_plot_details_new was updated to pass an index instead of the entry into plot_string. This means we are passing "i" to plot_string after the final increment of the for loop, instead of getting the entry[i] within the loop before the final increment. This means if we are mousing over the far right of the graph, where the time based break is not hit, we will end up passing an index equal to nr-2 instead of nr-3, which is intended to shave off the final two rows containing data not useful to the display. There are a handful of ways to fix this. This commit intends to be consistent with stylistic choices made elsewhere in the project. Signed-off-by: Josh Torres <torres.josh.j@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-03undo: renumber cylinders when deleting a cylinderGravatar Berthold Stoeger
Removal of a cylinder requires a renumbering of cylinders in the core data structures (samples, etc.). The renumbering was performed in the undo-action of cylinder removal, but not during actual cylinder removal. What a mess! Add the missing call. Attention: this makes the deletion of sensor-readings on cylinder-deletion non-undoable! Undo will have to be fixed in upcoming commits. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-03desktop: warn when deleting a cylinder with sensor readingsGravatar Berthold Stoeger
This makes the sensors pointless and in the future, they will be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-03core: add a function to test for sensors of a given cylinderGravatar Berthold Stoeger
We want to prevent the user from accidentally deleting a cylinder with sensor readings. Therefore, we need such a function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-03parser: XML_PARSE_RECOVER to xmlReadMemory()Gravatar Berthold Stoeger
Due to changes in the handling of sensor-ids, invalid XMLs were generated. In particular, these contained duplicate attributes in the sample tags. Even though these files shouldn't exist, let's try to parse them anyway. Some data will be lost, but that's better than not opening the file. libxml2 can be told to try to recover from such petty(?) errors by passing the XML_PARSE_RECOVER flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-09-02mobile: update version to 3.3.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-09-02mobile: fix broken cylinder name tracking in dive editGravatar Dirk Hohndel
Prior to this change, we had two different cylinder lists as models for drop down boxes - one that prepends the "no default cylinder" entry (which we need for setting up no default cylinder to be used in the app), and another one that only includes actual cylinders. The problem occured if a dive is created before the first time we edit an existing dive: in this case we are applying indices across the two models, but the indices are of course off by one; this results in actually picking the wrong cylinder. So each time we try to edit a dive, we end up with the previous cylinder in the list. This commit simplifies the code by having only one place where we create list of cylinder names (which is then used as the model for the combo box). It also uses more logical names for the two 'flavors' of this list to make it clear which one is supposed to be used (the regular list when editing or adding dives, the one with the "no default cylinder" entry prependet for the Settings page). Reported-by: Brian Fransen Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-08-20update README and ReleaseNotes for 5.0.3v5.0.3Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-08-20Update list of supported dive computersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-08-20Pull latest translations from transifexGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-08-20another libdivecomputer updateGravatar Dirk Hohndel
- add string serial numbers for Suunto Vyper and Mares IconHD type dive computers - add support for Cressi Neon Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-08-19update libdivecomputerGravatar Dirk Hohndel
Add support for new gas change data from EON Steel with FW 2.5 Fixes #3254 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>