subsurface/core
Jan Mulder 709c1df2af BLE: read until no more data in coming in
The current BLE read reads just one 20 bype packet. That packet size is set
in ble_serial_ops, so, without being able to test on anything other than
a OSTC3, I assume that this holds for other BLE DCs too. So, I think is
is weird that those interfaces work with the current read() of just one
packet at the time.

As we need a blocking read (at least for the OSTC parser), just read all
data that is available on the input. And when we think we are done, give
the QtEventloop control to see if there is more, and process that incoming
data as well. All this basically implements a blocking read.

CAVEAT 1: This might break the reading from the currently working BLE devices.

CAVEAT 2: With this, I still cannot read the OSTC3 completely. For
developers familiar with the HW transfer protocol: it just stops while
reading the first full dive (header + profile) command 0x66, despite
correctly reading about 5Kb of data before. For some
reason, I do not believe that this is related to this commit.

CAVEAT 3: All above tested on Linux Desktop with bluez stack, and
confirmed NOT to work on Android 7.1.2, build with Qt 5.9.0, And
yes, I know 5.9.1 recommended.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-04 23:46:07 +09:00
..
subsurface-qt QML UI: DiveList: add date box to trip header 2017-06-24 13:13:04 -07:00
android.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
btdiscovery.cpp Rewrite the matching code for BT devices 2017-07-03 21:58:26 -07:00
btdiscovery.h Rewrite the matching code for BT devices 2017-07-03 21:58:26 -07:00
checkcloudconnection.cpp Typo of translated string 2017-06-23 07:55:58 +09:00
checkcloudconnection.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
cloudstorage.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
cloudstorage.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
CMakeLists.txt Very early and likely quite broken BLE GATT code 2017-06-24 21:58:01 -07:00
cochran.c Cochran import: Removed long tail of 0 depth from profile 2017-05-31 21:54:05 -07:00
cochran.h Cochran import: better support for older models 2017-05-31 21:53:00 -07:00
color.cpp Display gas density instead of SAC in planner 2017-05-26 15:52:04 -07:00
color.h Display gas density instead of SAC in planner 2017-05-26 15:52:04 -07:00
compressibility.r Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputer.cpp Switch over to SSRF_CUSTOM_IO v2 2017-06-27 13:58:15 -07:00
configuredivecomputer.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
configuredivecomputerthreads.cpp Fix some warnings 2017-05-06 11:12:28 -07:00
configuredivecomputerthreads.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
datatrak.c datatrak.c: don't use POSIX %m format for sscanf() in dtrak_prepare_data() 2017-06-11 15:56:41 -07:00
datatrak.h Datatrak import rework: Add another memory size ckeck 2017-05-07 07:48:12 -07:00
deco.c Adopt planner state caching to new struct 2017-05-26 15:44:36 -07:00
deco.h Assemble global state of planner in a struct 2017-05-26 15:44:36 -07:00
device.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
device.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
devicedetails.cpp Implement OSTC4 specific settings 2017-05-04 10:50:15 -07:00
devicedetails.h Implement OSTC4 specific settings 2017-05-04 10:50:15 -07:00
display.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
dive.c Fix event merging when interleaving dives 2017-04-30 12:38:09 -07:00
dive.h tankinfomodel.cpp: clamp row index to [0 - MAX_TANK_INFO] 2017-06-15 14:48:49 -07:00
divecomputer.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divecomputer.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divelist.c Separate the download thread from the widget logic 2017-05-27 07:53:14 -07:00
divelist.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
divelogexportlogic.cpp Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
divelogexportlogic.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesitehelpers.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesitehelpers.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
downloadfromdcthread.cpp Rewrite the matching code for BT devices 2017-07-03 21:58:26 -07:00
downloadfromdcthread.h code cleanup: remove 2 unused structs 2017-06-16 05:31:41 +09:00
equipment.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
exif.cpp Image import: Make Exif handling more tolerant, better info,... 2017-05-06 08:07:16 -07:00
exif.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
file.c Merge branch 'seabear-refactor' 2017-05-07 07:52:55 -07:00
file.h Datatrak import rework: changes of file.c and file.h 2017-05-07 07:48:12 -07:00
gas-model.c Compute and display gas density 2017-05-26 15:52:04 -07:00
gaspressures.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gaspressures.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettext.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettextfromc.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettextfromc.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
git-access.c Clean up git storage update messages 2017-06-18 01:00:30 -07:00
git-access.h Clean up git storage update messages 2017-06-18 01:00:30 -07:00
gpslocation.cpp Check if we have an instance before dereferencing it 2017-05-06 11:12:07 -07:00
gpslocation.h Check if we have an instance before dereferencing it 2017-05-06 11:12:07 -07:00
helpers.h Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
imagedownloader.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
imagedownloader.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
isocialnetworkintegration.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
isocialnetworkintegration.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
libdivecomputer.c Update Subsurface-branch of libdivecomputer check 2017-06-27 20:52:12 -07:00
libdivecomputer.h Switch over to SSRF_CUSTOM_IO v2 2017-06-27 13:58:15 -07:00
linux.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
liquivision.c Fix buffer overrun and primary sensor id issues in Liquivision import 2017-06-15 14:44:18 -07:00
load-git.c Clean up git storage update messages 2017-06-18 01:00:30 -07:00
macos.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
membuffer.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
membuffer.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
metrics.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
metrics.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
ostctools.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
parse-xml.c Parse He when importing from DM5 2017-06-13 18:11:22 +09:00
planner.c Adopt planner state caching to new struct 2017-05-26 15:44:36 -07:00
planner.h Move planner notes to separate file 2017-05-26 15:44:36 -07:00
plannernotes.c Move planner notes to separate file 2017-05-26 15:44:36 -07:00
pluginmanager.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
pluginmanager.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
pref.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
prefs-macros.h Wire up duration units preference UI 2017-05-06 13:49:36 -07:00
profile.c Preserve VPM-B state in profile display 2017-06-22 10:39:37 +09:00
profile.h Compute and display gas density 2017-05-26 15:52:04 -07:00
qt-ble.cpp BLE: read until no more data in coming in 2017-07-04 23:46:07 +09:00
qt-ble.h OSTC over BLE: filter and track OSTC credit traffic 2017-07-04 23:46:07 +09:00
qt-gui.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
qt-init.cpp Don't warn about missing en-US translation for Qt 2017-07-03 13:29:25 -07:00
qthelper.cpp Translate "more than n days" for surface interval 2017-06-23 22:43:39 +09:00
qthelper.h Merge branch 'seabear-refactor' 2017-05-07 07:52:55 -07:00
qthelperfromc.h Move planner notes to separate file 2017-05-26 15:44:36 -07:00
qtserialbluetooth.cpp Whitespace 2017-06-27 20:53:21 -07:00
save-git.c Clean up git storage update messages 2017-06-18 01:00:30 -07:00
save-html.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
save-html.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
save-xml.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
serial_ftdi.c Fix one call site that hadn't been updated 2017-06-27 21:24:00 -07:00
sha1.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
sha1.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
statistics.c Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
statistics.h Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
strndup.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
strtod.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
subsurfacestartup.c Set default cloud timeout to ten seconds for mobile app 2017-06-17 22:56:08 -07:00
subsurfacestartup.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
subsurfacesysinfo.cpp Random whitespace cleanup 2017-05-27 11:07:20 -07:00
subsurfacesysinfo.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
taxonomy.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
taxonomy.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
time.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
uemis-downloader.c Switch over to SSRF_CUSTOM_IO v2 2017-06-27 13:58:15 -07:00
uemis.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
uemis.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
units.h Adopt O2 and He densities to 20degC 2017-05-26 15:52:04 -07:00
version.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
version.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
webservice.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
windows.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
windowtitleupdate.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
windowtitleupdate.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
worldmap-options.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
worldmap-save.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
worldmap-save.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00