Skip to content

Commit

Permalink
Disable BLE advertisement timeout
Browse files Browse the repository at this point in the history
At BLE timeout, the ESB radio was also disabled.
  • Loading branch information
ataffanel committed Feb 1, 2024
1 parent 0447e32 commit b86e916
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ble/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
#define DEVICE_NAME "Crazyflie" /**< Name of device. Will be included in the advertising data. */
#define MANUFACTURER_NAME "Bitcraze AB" /**< Manufacturer. Will be passed to Device Information Service. */
#define APP_ADV_INTERVAL 300 /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
#define APP_ADV_TIMEOUT_IN_SECONDS 180 /**< The advertising timeout in units of seconds. */

#define APP_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. */
#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
Expand Down Expand Up @@ -787,7 +786,7 @@ static void advertising_init(void)
memset(&options, 0, sizeof(options));
options.ble_adv_fast_enabled = true;
options.ble_adv_fast_interval = APP_ADV_INTERVAL;
options.ble_adv_fast_timeout = APP_ADV_TIMEOUT_IN_SECONDS;
options.ble_adv_fast_timeout = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED;

err_code = ble_advertising_init(&advdata, NULL, &options, on_adv_evt, NULL);
APP_ERROR_CHECK(err_code);
Expand Down

0 comments on commit b86e916

Please sign in to comment.