Clear lasttoradio on BLE disconnect (#8095)

* On disconnect, clear the lastToRadio buffer

* Move it, bucko!
This commit is contained in:
Ben Meadors
2025-09-23 07:31:25 -05:00
committed by GitHub
parent 8e608e8186
commit 1968a009dd
2 changed files with 9 additions and 2 deletions

View File

@@ -247,6 +247,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
bluetoothPhoneAPI->numBytes = 0;
bluetoothPhoneAPI->queue_size = 0;
}
// Clear the last ToRadio packet buffer to avoid rejecting first packet from new connection
memset(lastToRadio, 0, sizeof(lastToRadio));
#ifdef NIMBLE_TWO
// Restart Advertising
ble->startAdvertising();