Skip to content

Commit 2bb3083

Browse files
committed
nRF52: Fix gatt.setRSSIHandler on the first active connection
1 parent 0162391 commit 2bb3083

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
JIT: When referencing a built-in member function of a built-in (Math.*, E.*, PIN_NAME.*, etc) include address rather than looking up (#2398)
1212
nRF52 Central: Lower min connection interval from 20->7.5ms, max 200->1000ms (allows some extra devices to be connected to)
1313
Bangle.js2: Add optional long press button actions to `showPrompt` (#2656)
14+
nRF52: Fix gatt.setRSSIHandler on the first active connection
1415

1516
2v27 : nRF5x: Ensure Bluetooth notifications work correctly when two separate connections use the same handle for their characteristics
1617
nRF5x: Remove handlers from our handlers array when a device is disconnected

targets/nrf5x/bluetooth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context) {
12801280
case BLE_GAP_EVT_RSSI_CHANGED: {
12811281
int centralIdx = jsble_get_central_connection_idx(p_ble_evt->evt.gap_evt.conn_handle);
12821282
#if CENTRAL_LINK_COUNT>0
1283-
if (centralIdx) {
1283+
if (centralIdx >= 0) {
12841284
jsble_queue_pending(BLEP_RSSI_CENTRAL, (p_ble_evt->evt.gap_evt.params.rssi_changed.rssi&255) | (centralIdx<<8));
12851285
}
12861286
#endif

0 commit comments

Comments
 (0)