Changeset bc1a313 in subsurface


Ignore:
Timestamp:
Jul 3, 2017, 10:22:16 PM (3 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
40d85b5
Parents:
345e063
git-author:
Dirk Hohndel <dirk@…> (07/03/17 17:46:22)
git-committer:
Dirk Hohndel <dirk@…> (07/03/17 22:22:16)
Message:

Increase the BLE timeout to 12 seconds

This seems really long, but one user appeared to get a response after
almost 10 seconds. So going with 12 for some margin of error.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/qt-ble.cpp

    rf98fa50 rbc1a313  
    2020#include <libdivecomputer/custom_io.h>
    2121
     22#define BLE_TIMEOUT 12000 // 12 seconds seems like a very long time to wait
     23
    2224extern "C" {
    2325
     
    138140
    139141                QTimer timer;
    140                 int msec = 5000;
     142                int msec = BLE_TIMEOUT;
    141143                timer.setSingleShot(true);
    142144
     
    191193
    192194        // Create a timer. If the connection doesn't succeed after five seconds or no error occurs then stop the opening step
    193         int msec = 5000;
     195        int msec = BLE_TIMEOUT;
    194196        while (msec > 0 && controller->state() == QLowEnergyController::ConnectingState) {
    195197                waitFor(100);
     
    217219        controller->discoverServices();
    218220
    219         msec = 5000;
     221        msec = BLE_TIMEOUT;
    220222        while (msec > 0 && controller->state() == QLowEnergyController::DiscoveringState) {
    221223                waitFor(100);
     
    233235
    234236        qDebug() << " .. discovering details";
    235         msec = 5000;
     237        msec = BLE_TIMEOUT;
    236238        while (msec > 0 && ble->preferredService()->state() == QLowEnergyService::DiscoveringServices) {
    237239                waitFor(100);
Note: See TracChangeset for help on using the changeset viewer.