summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-09-28Mac: Turn on automatic GPU switchingGravatar Robert C. Helling
We are not OpenGL heavy so this saves battery life. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-27build-system: fix kirigami.pri for iOS buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-27QML UI: newer Kirigami and falloutGravatar Jan Mulder
Update to the master of today, and no issues detected on mobile-on-desktop and Android. Only, the ugly border is back as the magic hack of 0b16b547ae2aefb1 failed due to the patch file that errored. So that is fixed too. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-27Update to latest libdivecomputerGravatar Dirk Hohndel
Fix dc_iostream_{read,write} debugging implementation Mares Icon HD family: send the command as one single write buffer Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-27mobile, QML UI: Settings page scalabilityGravatar Jan Mulder
A relatively big change for such a simple page. Most relevant changes are: 1) Do not use Kirigami.Header anymore. It appears that this header has word wrapping on (and we cannot override that). This is annoying on this page, as headings seems randomly be split over 2 lines, even in cases where there is more than enhough room to display it on one line. And as the Kirigami.Header is just a trivial wrapper of a Text field, we can simple replace it. 2) A lot of the toplevel GridLayouts had width properties set. These are not needed (and confused my debugging code), so they are removed withput any visual change. As a general rule, do not try to set properties that are not needed. In general, it can only lead to binding loops or undefined behavior. 3) Add a font size to our Theme. The step from regular to title size was a little too big. 4) And, obviously, numerous font.pointSize lines are added to actually resize the font. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26qt-ble: allow reading of partial packet dataGravatar Linus Torvalds
The existing BLE dive computers treat BLE as the packetized protocol it is, and read whole packets at a time. However, the Mares BlueLink backend treats it as just a basic "serial over BLE" transport, and for historical reasons reads the reply packets in smaller chunks. This allows that kind of IO behavior, where if the divecomputer backend reads just a part of a packet, we'll split the packet, return the part the user asked for, and push back the leftover packet onto the received packet queue. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-26Allow XML sample times to have hh:mm:sec formatGravatar Linus Torvalds
We traditionally only allow samples to have a time format of 'mm:ss', so if you have a dive over an hour, you would just have a minutes field larger than 60 minutes. But Matthew Critchley is trying to import some dives from his VMS Redbare CCR, and the sample timestamp format he has is of the type 'hh:mm:ss'. That could be fixed by a xslt translation, but there's no real reason why we couldn't just support that format too. Reported-by: Matthew Critchley <matthew.s.critchley@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-26mobile, QML UI: whitespace in dive details pageGravatar Jan Mulder
There was a strange big margin at the top of the the dive details page. Just make it a bit more "normal". Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: margings and paddings in download screenGravatar Jan Mulder
There was a significant of not needed whitespace on the download from DC page. Most importantly, the bottom buttons where not on the bottom, so we had to truncate the downloaded dives early (to prevent overflowing the buttons). Further, a tiny bit of padding is removed between the 3 top pull down items. All this, results in the diplay of more dives without scrolling. For example, previously, only 1 dive (with 1 stored DC) was shown on my 5.5" device, and now 3 (scale: regular). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: make SsrfCheckBox resizableGravatar Jan Mulder
Changed some hard coded size and positioning of the SsrfCheckBox, in such a way that is scales nicely to the current setting of the mobile_scale. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: fix overlapping buttonGravatar Jan Mulder
The select buttons in the downloaded dives delegate overlapped the dive data. Simple margin change fixes this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: ssrfButton and download controls resizableGravatar Jan Mulder
Make the ssrfButton and the pull down menu's on the download page resizable. Notice that also the contents of the pulldown menu's is scaled based on the font size. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25Update to latest libdivecomputerGravatar Dirk Hohndel
Fix bugs in Shearwater Teric support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25qt-ble: add BLE packet debugging codeGravatar Linus Torvalds
This is perhaps overly verbose, but the timing details helped figure out some EON Core download issues, and it's nice to see when things actually happen. It's also good to see when the data actually enters our queues, and when we read and write the packets. That might help debug the issues Fabio is seeing with the Mares Bluelink. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-25qt-ble: only connect the signals to the preferred serviceGravatar Linus Torvalds
We used to just find all services and connect the characteristics change signal etc to them all, but we really only care about the actual preferred service that we'll be using. So move the qt ble signal connection to after we've selected the preferred service that we will actually be enabling notifications on and do the writes to. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-25CHANGELOG.md updateGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-25Metadata: rudimentary support for XMP metadataa in MP4-based videosGravatar Berthold Stoeger
XMP is a media-metadata standard based on XML which may be used across a variety of media formats. Some video-processing software writes XMP data without updating the native metadata fields. Therefore, we should aim at reading XMP metadata and give priority of XMP data over native fields. Pros: - Support for *all* common media formats. Cons: - XML (complex, verbose, chaotic). - Does not even come close to fulfilling its promise of being well defined (see below). Implement a simple XMP-parser using libxml2. Connect the XMP-parser to the existing Quicktime/MP4 parser. First problem encountered: According to the spec, XMP data supposed to be put in the 'XMP_' atom. But for example exiftools instead writes an 'uuid' atom with a special 16-byte uid. Implement both, more options will probably follow. Second problem: two versions of recording the creation date were found 1) The content of a <exif:DateTimeOriginal> tag. 2) The xmp::CreateDate attribute of a <rdf:Description> tag. Here too, more versions are expected to surface and will have to be supported in due course (with an obvious priority problem). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-25Mobile: use editText instead of currentText in Suit and DiveMaster boxesGravatar Berthold Stoeger
A user reported problems with editing the Suit and DiveMaster fields. Apparently, editing does not change the currentText. Without doing a deeper analysis, simply use editText (a more proper fix might be changing the currentIndex on editing). (Parially?) fixes #1694 Reported-by: Mark Powell <mcpowell123@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-25mobile, QML: correct font scaling of the divelistGravatar Jan Mulder
Changing the scale, it seems that the header of trips is not rescaled. The reason for this is simple. That string does not use our manipulated font but a different one. In fact, this is the only ocurrence on the divelist that did not scale. However, other screens hardly rescaled at all. All these will be fixed in seperate commits. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: scale font from the buttonsGravatar Jan Mulder
After the work in the previous commit, it gets very simple to implement font scaling. Just assign a the new desired font scale to the used font metrics. The QML engine does all the work. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: introduce basePointSize in subsurfaceThemeGravatar Jan Mulder
By manipulation the used font pointSize property, we can dynamically scale fonts and derived UI objects. At the same time, we have some logic to determine the default font, its size, etc, for example depending on screen properties. The scaling of the UI (and its font) does not need to interfere with those defaults. However, when we want to reset the pointSize, we alter the default, so a backup of the default is needed. Ok, not al full backup, as the only thing we like to manipulate is the pointSize, to which we want to be able to return. All this leads to this commit. A basePointSize property is added, that is initialized from the default. Due to the binding logic of the QML engine, it is not a classic initialization, but a binding between the 2 properties. We need to break that binding explicitly, so that the original PointSize is always preserved. In addition, a display of the new font property is added to the developers theme test. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: do not user a local font metric objectGravatar Jan Mulder
This theme test display created a new local FontMetrics object, that does not per definition correspond with the "global" font metric as defined in main.qml. The fix is simple. Display the font theme data based on the one and only font metric from main.qml Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25cleanup: do not compare doubles like thisGravatar Jan Mulder
Cleanup another possibly dangerous compare of doubles. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25QML UI: add settings for scale factorGravatar Dirk Hohndel
The visual feels backwards as the selected one is grayed out... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25qPref: don't compare doubles for equalityGravatar Dirk Hohndel
This is a much safer way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25qPref: add mobile_scale preferenceGravatar Dirk Hohndel
We use that in the mobile app to scale the whole app, as all sizes there are relative to the default font. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25QML UI: ensure we use the correct default fontGravatar Dirk Hohndel
It seems the documentation is incorrect - unless you explicitly set the ApplicationWindow font to the the Application Font (just writing this down sounds so silly...), it doesn't actually work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25Mobile/download DC: disable selected DC buttonGravatar Jocke
Disable the button for the currently selected DC. This gives an extra visual hint of which DC is currently selected. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/settings: clear all of qPrefDiveComputer.vendorGravatar Jocke
To prevent stale data in the download DC path we need to clear the entire qPrefDiveComputer.vendor() object when the user purges the used DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/Settings: Disable unusable optionGravatar Jocke
Disable the "Forget DCs" button when there is no DCs saved. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/download DC: simplify startupGravatar Jocke
Since we now store the last used DCs in out preferences we can use the information to pre-populate the DC selector. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/downloadDC: always start with empty indexGravatar Jocke
To prevent stale data being visible always set the combobox indexes to -1 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile: let Flow object use all of the parent widthGravatar Jocke
There is no point in further restricting the width of the Flow object. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Update libdivecomputerGravatar Dirk Hohndel
Add support for the Aqualung i100. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-24qt-ble: re-organize how we pick the GATT characteristics to read and writeGravatar Linus Torvalds
We used to just blindly pick "first" and "last" characteristic from the preferred service, and that was stupid but happened to work for the dive computers we supported. Note that for some of them, "first" and "last" was actually the *same* characteristic, since it could be a single one that supported both. However, this first/last hack definitely doesn't work for the Mares BlueLink BLE dongle, and it's really all pretty wrong anyway. So re-organize the code to actually look at the properties of the characteristics. I don't have a BlueLink to test with, but my EON Core and Shearwater Perdix AI are still happy with this, and the code conceptually makes a lot more sense. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-24Desktop/remember DCs: insert the remember connection into dropdownGravatar Dirk Hohndel
This still doesn't do the right thing for BT/BLE connections on a Mac, but it should work on Linux and possibly Mac. We definitely need to figure out how to get the Mac to successfully connect back to a BT/BLE device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-24macOS: always list 'FTDI' as a serial connectionGravatar Dirk Hohndel
We now link against the user space FTDI driver. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-24cleanup: remove more GPS webservice codeGravatar Jan Mulder
And remove some includes and defines that are not used any more after removal of the GPS webservice code. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-24core: fix connect callGravatar Jan Mulder
Fix multiple run-time errors in connect call introduced in 504e9125126. 1) Set the proper signature of the signal. 2) make the used slot a real slot (so move it to the proper section in the header) and 3) set the proper signature for the slot. Highly unlikely that normal users notice the runtime errors and possibly unwantend behavior, as this all deals with the subtile GPS service update threshold. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-23Update mobile version numberGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23qt-ble: set up infrastructure for better preferred service choiceGravatar Linus Torvalds
We used to just pick the first non-standard service we found (with a special case for the Heinrichs Weikamp dive computers that have an actual registered standard service). We then waited for that service to finish discovery, and started using it. This changes the logic to wait for _all_ services to finish discovery, and then after that we pick the one we like best. Right now the rule for picking a preferred service is the same one we had before, but the difference is that we now have the full discovery data, so we *could* do something better. Plus this makes our debug messages a lot more legible, when we don't have the mix of overlapping service discovery with the actual IO we do to the preferred service. NOTE! This doesn't much matter for most of the dive computers that we currently support BLE for. They don't tend to have a lot of odd services. But at least both the Mares BlueLink and the Garmin Descent both have multiple services and it's not obvious which one to use, and this will make it not only easier to debug those, it will make it easier to pick the right preferred service descriptor to use. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-23qt-ble: use the WAITFOR() macro rather than open-coding wait loopsGravatar Linus Torvalds
This is not only much clearer (and smaller code), but it also lowers the latency for the waiting, since we don't always wait for the full 100ms. Get rid of the now unused "waitfor()" function that just unconditionally waited for 100ms. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-09-23Core: split process_dives() in post-import and post-load versionsGravatar Berthold Stoeger
process_dives() is used to post-process the dive table after loading or importing. The first parameter states whether this was after load or import. Especially in the light of undo, load and import are fundamentally different things. Notably, that latter should be undo-able, whereas the former is not. Therefore, as a first step to make import undo-able, split the function in two versions and remove the first parameter. It turns out the the load-version is very light. It only sets the DC nicknames and sorts the dive-table. There seems to be no reason to merge dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-23Mobile/remember DCs: try to match device namesGravatar Dirk Hohndel
We only store the address part of the connection name, so don't try to find an exact match, try to find the sub-string. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Desktop/settings: hook up button to clear remembered DCsGravatar Dirk Hohndel
And at least admit that the reset settings button isn't hooked up at all. OOOOPS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Desktop/settings: add button to forget remembered dive computersGravatar Dirk Hohndel
This isn't hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Mobile/settings: add button to forget remembered dive computersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Mobile/remember DCs: allow the buttons to flowGravatar Dirk Hohndel
The hard grid may look nicer on bigger screens, on smaller screens it's a problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Update HTML versions of manualsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23User manual: describe the DC shortcut buttons for mobileGravatar Dirk Hohndel
It would be great to have a corresponding screen shot. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>