Skip to content

Commit 6c607c9

Browse files
committed
Disable BLE advertisement timeout
1 parent 7c83bcb commit 6c607c9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
#define DEVICE_NAME "Crazyflie Loader" /**< Name of device. Will be included in the advertising data. */
100100
#define MANUFACTURER_NAME "Bitcraze AB" /**< Manufacturer. Will be passed to Device Information Service. */
101101
#define APP_ADV_INTERVAL 300 /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
102-
#define APP_ADV_TIMEOUT_IN_SECONDS 180 /**< The advertising timeout in units of seconds. */
103102

104103
#define APP_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. */
105104
#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
@@ -516,7 +515,7 @@ static void advertising_init(void)
516515
memset(&options, 0, sizeof(options));
517516
options.ble_adv_fast_enabled = true;
518517
options.ble_adv_fast_interval = APP_ADV_INTERVAL;
519-
options.ble_adv_fast_timeout = APP_ADV_TIMEOUT_IN_SECONDS;
518+
options.ble_adv_fast_timeout = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED;
520519

521520
err_code = ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);
522521
APP_ERROR_CHECK(err_code);

0 commit comments

Comments
 (0)