When I switched over from our own custom IO implementation to the new
upstream custom IO model in libdivecomputer, I completely missed the
fact that the libdivecomputer custom IO model also does a custom _sleep_
function.
I'm not entirely sure what the point was, and it broke things even in
libdivecopmputer itself when some of the new sleep functions were
broken.
Anyway, we didn't export any sleep functions at all for the bluetooth,
BLE and FTDI cases, the the libdivecomputer code didn't fall back to any
sane default sleep implementation either, so the end result was no
sleeping at all.
Which didn't matter for most divecomputers.
But it seems like at least some OSTC dive computers did care, at least
in certain situations, and both Miika and Anton had trouble downloading
with their OSTC Sport dive computers. Using the serial line protocol
and the legacy /dev/rfcomm model worked fine, because then it used the
sleeping functions in the POSIX serial code inside libdivecomputer.
This just adds trivial sleeping functions for the affected download
protocols. Maybe I should have just made libdivecomputer have a sane
default instead, but this wasn't hard either (the hard part was trying
to figure out why the downloads worked for some people and not for
others).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
When we introduced the whole check for supported transports code, no one
noticed that it broke configuring all ostc's over bluetooth.
The configure code just used a placeholder model of OSTC 3 to get the
right backend code. With the new supported transports model it errored
out if you where trying to connect to a bluetooth enabled device, just
because the original OSTC 3's wasn't bluetooth enabled.
This switches the placeholder model over to a OSTC Plus which is both
bluetooth, serial and ble capable, so the code works again.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Allow Derek to modify labels and milestones and add a few more of our
contributors to the list of people allowed to give Derek commands.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The information on how to build smtk2ssrf was pretty outdated.
Update this information and point to subsurface downloads repo for
windows installer and linux appimage.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
The QML types needs to be registered before the MainWindow
instance is created on the desktop version, otherwise
the MapWidget instance will be created and it will fail
with a missing QML namespace.
In subsurface-helper.cpp, move register_qml_types() from run_ui()
to init_ui(), as later in init_ui(), MainWindow is instantiated
for the first time in the desktop version.
Ref #1500
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
add test cases to secure struct preferences and qPrefAnimations work together
remove animation tests from testpreferences
Signed-off-by: Jan Iversen <jani@apache.org>
remove Animations from SettingsObjectWrapper and reference qPrefAnimations
update files using SettingsObjectWrapper/Animations to user qPrefAnimations
this activated qPrefAnimations
Signed-off-by: Jan Iversen <jani@apache.org>
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed
one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.
REMARK: this commit only defines the class, it is not active in production
Signed-off-by: Jan Iversen <jani@apache.org>
remove test macro, split in functions and add test cases
the existing test macro does not work because
sync() does not save these variables to disk (set* does)
Signed-off-by: Jan Iversen <jani@apache.org>
ensure SettingsObjectWrapper load() loads all display variables.
Copy font setting code from SettingsObjectWrapper to qPrefDisplay
Signed-off-by: Jan Iversen <jani@apache.org>
Add qPrefDisplay sync to sync in SettingsObjectWrapper.
If a program part change display variables in struct preferences, they would
not be saved on disk.
Signed-off-by: Jan Iversen <jani@apache.org>
add the prepared class qPrefDisplay to SettingsObjectWrapper and thereby making it active.
As a consequence of the uniform naming standard desktop-widgets/preferences_defaults.cpp and
tests/testpreferences.cpp have been updated.
Signed-off-by: Jan Iversen <jani@apache.org>
add subsurface-helper.cpp to TestQML target
remove local qmlRegisterType() and add register_qml_types() instead
Signed-off-by: Jan Iversen <jani@apache.org>
With Qt 5.11 the qml compiler is included and qmlc files created in the same
directory as the qml file (at least for the qml test harness).
ignore *.qmlc
Signed-off-by: Jan Iversen <jani@apache.org>
Move few mobile only functions from mobile-helper to mobile-main
remove subsurface-mobile-helper
file structure is now subsurface-*-main.cpp + subsurface-helper.cpp
Signed-off-by: Jan Iversen <jani@apache.org>
Remove qmlRegister in desktop-widgets/mapwidget in order to have a shared
registration in subsurface-helper.cpp
Signed-off-by: Jan Iversen <jani@apache.org>
add subsurface-helper.cpp to share functions between mobile and desktop
move mobile qml registrations to a shared function (avoiding differences in registrations)
Target is to replace current subsurface-desktop-main + subsurface-desktop-helper and
subsurface-mobile-main + subsurface-mobile-helper with
subsurface-*-main + subsurface-helper
Signed-off-by: Jan Iversen <jani@apache.org>
The versions for openSSL in variables.sh and get-dep-lib.sh needs to match or we end up recloning the repo on every build.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Add a comment to the variables.sh file so we don't forget to update
qt version in the qt-installer-nontineractive file as well.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
With commit c62ce43 the Qt version where updated to 5.11.1,
this updates the qt install script to match the versions of the Qt parts we want.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
As per discussion in #1460 there is no point in showing decimal values
for pressures in the equipment tab on desktop or in the dive edit view on
mobile.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
add canonical_version and mobile_version to qPref
Having a property in qPref, allows the use in qml, and prepare the
interface for qml testing.
Signed-off-by: Jan Iversen <jani@apache.org>
add check for return code in qmlRegisterType calls, and log a
message if failed
There are a lot of name restrictions (e.g. must start with a capital letter).
Signed-off-by: Jan Iversen <jani@apache.org>
add enum to qPref and remove elsewhere
update source core to reference qPref.
the enum cannot be in pref.h because it is to be used in qml and Q_ENUM
need the enum to be defined as part of the class
Signed-off-by: Jan Iversen <jani@apache.org>
Depth values might apparently contain decimal comma instead of decimal
point with some locale settings. Thus add support for both of them.
Fixes#1485
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Instead of dealing with the challenges of downloading and installing the
official package (which really prefers to be run interactively and
frequently caused Travis failures) we get the pre-packed bits from our
cache instead. Less data to transfer, quicker install.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>