Commit graph

5 commits

Author SHA1 Message Date
Dirk Hohndel
33a7e5cd73 Build fix for older Qt5
This breaks for example on Ubuntu Trusty.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 10:59:40 -07:00
Dirk Hohndel
fa69a1b7d5 Allow to compile Subsurface with upstream libdivecomputer
This will create an inconsistent build that has some UI features implying
BT support but those will be non-functional. I don't think this is the
right thing to do - either fail to build with a decent message or really
remove the BT support.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-07 21:41:22 -07:00
Dirk Hohndel
b1538c809d Code cleanup
Make precedence of && over || explicit.
Explicitly convert between char * and unsigned char *.
Don't assign potentially negative return code to an unsigend variable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 13:59:14 -07:00
Claudiu Olteanu
14e071e8d8 Add extra logs for custom serial Bluetooth implementation
This patch increases the verbosity level for QtBluetooth API
and add some extra logs for custom serial Bluetooth open method.

The scope of this patch is only for testing.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 08:38:12 -07:00
Claudiu Olteanu
198cc41959 Implement the custom Bluetooth serial communication and use it
Create a custom Bluetooth serial communication using the QTBluetooth
API and use it when the Bluetooth download mode is enabled.
First try to connect on RFCOMM channel 1 because this is the default
RFCOMM channel of SPP service for most devices. If this doesn't work
try again on RFCOMM channel number 5 because it could be a Petrel2 device.

Add a fake open function for the custom implementation. This is
used when the selected device is HW OSTC 2N and the Bluetooth
mode is activated, then fake the open call of the serial device.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06 08:37:42 -07:00