We do strip the user friendly name from BT addresses and this mistakenly
mangled 'USB device' to 'device'.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The info text from the download process wasn't rendered correctly.
maximumWidth ended being a recursive reference and as a result the text
would render as very narrow and super-tall field.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt 5.11 adds useful warnings when code attempts to use anchors within
Layouts and even tells you how to fix things.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is based on something that Anton Ludin sent to the mailing list.
Reading through the code it seemed that there were scenarios in which
DC_vendor and DC_product were not updated correctly. That's one of the
problems of the declarative approach in QML - it can be very hard to
figure out which code is run when in certain situations.
This may help address the issue with FTDI downloads no longer working on
Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Looks like commit 807571a588 ("core: update deviceData default from
qml") never actually was tested with dive computer download. This looks
rather like an automatic renaming gone wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Set index of comboboxes in Download screen when the page
becomes visible instead of when it is created.
The pages is created before QBluetoothDeviceDiscoveryAgent on iOS and desktop,
therefore combobox indexes cannot be set during page creation.
Signed-off-by: Jan Iversen <jani@apache.org>
Users need a simple way to report download problems. Asking them
to go into settings, activate logging, and repeat the download
is too much.
libdivecomputer.log will always be generated, but overwritten, with every
download, so the latest log is ready.
The download is very slow due to BT, so there are no impact of having the log
active, neither in terms of size (a concern on small mobiles) or write time.
Signed-off-by: Jan Iversen <jani@apache.org>
When downloading with bluetooth, changing connection did not work.
The new selection was not passed to the download thread.
Fixes#1274
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Trivial and cosmetics only fix. The width of the rescan button
was forgotten, and this pushed the right margin to the right,
causing the combo menus to overflow the right margin.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
For some reason, after the update of the main.qml to version 2.2,
all Kirigami Pages and scrollablePages show up plain white.
So now, set a proper background for these pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Set download srceen in a sane state after a previous download
session using this screen. The erroneous behavior was very
similar to the one fixed in commit 7fe9bbe295dcf92. For example,
download some dives, quit the screen, go back, and the bottom
buttons are still selectable.
This commit resets some values when leaving the download screen
(ie. not only swiping it away), so that it looks sane at a next
visit.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Reset the Retry button on exit of the Download from divecomputer
page. So, it it not reset wehen swiping this page away, or
cancelling a running download, but resetting it on accepting
downloaded dives.
As we do not have real error reporting (from download failures),
this all is a little arbitrary. Another "fix" could be, not
changing the button text at all.
Further notice, this is not specific iOS, but also Android.
Fixes: #895
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Otherwise the divecomputer has to be in pairing mode
at app start time.
Unfortunately, this leaves less space for the progress message.
My time/qml knowledge does not suffice to move that to the next line
(when moving that out of the RowLayout it overlaps with
the buttons).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
on iOS the address we display on Connection is an UUID, not
a physical address.
This change the pattern (on iOS) used to enable bluetooth_mode.
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
When first tested this commit, especially the dive list was looking
terrible. However, after including newer SHA's from libkirigami, and
correcting lots of spacing/margin issue, a retest of this commit shows
no strange artifact any more, and the amount of warnings in the log
output is reduced significantly. So now, it appears save to
upgrade.
Notice that main.qml still uses Kirigami 2.0. and is not updated in
this commit. With version 2.2, there is a new way of theming, that
is not (yet) compatible with our current code. Blindly upgrading to
2.2 leads to a almost black dive list, wrong button colors, and
runtime errors in the log, due to the fact the direct setting from
QML Kirigami's Theme colors is not allowed any more.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
A not perfect improvement, but way better IMHO. Prevent the list of
downloaded dives to grow over the buttons at the bottom. Just a simple
change by adding a bottomMargin to the list.
Notice that there is still some overlap, but for now I consider this a
trade-off between the scarce screen real-estate and the wish to present
and much as possible dowloaded dives.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Again, mostly related to label change. First, the top button was "glued"
to the top of the screen, so added a little margin there. It
appeared that all the other items on the screen (progressbar,
2 button rows, and the downloaded dive list) where not moving down
due to the add of that little top margin. This was solved by
anchor-ing the items together. Finally, the text of a downloaded
dive was on the top of the delegate lines. Not sure where that came
from, but easily solved by centering it explicitly.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Commit 8f6827ab12 brought a new SHA for Kirigami, but that introduces
a very noisy logging of "Kirigami.Label is deprecated. Use
QtQuickControls2.Label instead".
So, thats what done here.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit implements possible switching BT on and off during a session,
so not needing a restart of the app when the user forgot to switch
it on when starting the app.
For this, the following needed to be done: 1) create a handler that
reacts on local BT device status changes. 2) repopulate the connection
list in the download screen when a BT status change is detected.
Notice the subtile change of the Q_INVOKABLE btEnabled() function
to a Q_PROPERTY. This gives a nice dynamic behaviour when
switching BT on/off with the app open.
Fixes: #556
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Fixes: #490 items 1) and 2).
1) Reference to isBluetooth.leftPadding is removed as the isBooltooth
checkbox is gone.
2) Do not set background color of downloaded dives. The checkbox is used
to denote "selected or not".
In addition, incorrect references to subsurfaceTheme.PrimaryColor (which
does not exist) are replaced by the correct subsurfaceTheme.primaryColor.
Finally, an obvious copy/paste error width: childrenRect.height. that
is supposed to be width: childrenRect.width.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit adds the capability to cancel a running download from DC.
The actual cancel is fully handled in the underlying libdivecomputer
code. As the user may be interested in the dives downloaded up to
the moment of cancel, do not just close the download screen (as
it was before this commit). Now, the <quit> button changes to
<cancel> when the download is started, and pressing cancel, only
cancels the download and does not close the download screen, but
presents the so far downloaded data. When no download is running,
the <quit> button just quits the screen as before.
Fixes: #485
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The connection already clearly defines whether this is Bluetooth or not.
No reason for the separate checkbox.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I wonder if we even need this anymore at all as the connection
clearly determines whether this is a BT download or not.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we can't find a match, just leave it unchanged. This way, if we
mis-recognize a device, the user can correct the product (or even
vendor) without losing the correct connection.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now we need to restart Subsurface-mobile in order to detect
Bluetooth devices - so simply turning on BT after Subsurface-mobile was
started is not sufficient.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These buttons only work when we successfully downloaded a dive. Also, don't
show a list of dives when there are no dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For now just do an indeterminate busy indicator - we can get more fancy
and use the libdivecomputer progress event, later.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't great, yet, but a first step to show that this is possible
(and in doing so I found quite a few spots where the colors weren't
correctly propagating, yet).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>