FIX #197 : Replace varclr with arrclr for BLEAdvertising _data fields
Otherwise the data field gets corrupted (?) causing error msg "bool BLEAdvertising::_start(uint16_t, uint16_t): 364: verify failed, error = NRF_ERROR_INVALID_LENGTH" as mentioned in this comment: https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/197#issuecomment-1403674667 see also https://devzone.nordicsemi.com/f/nordic-q-a/52573/sd_ble_gap_adv_set_configure-returns-error-nrf_error_invalid_length
This commit is contained in:
1 parent
fb4eb5211a
commit
dc1b3d7515
1 file changed
+2
-2
@@ -42,7 +42,7 @@
|
||||
BLEAdvertisingData::BLEAdvertisingData(void)
|
||||
{
|
||||
_count = 0;
|
||||
varclr(_data);
|
||||
arrclr(_data);
|
||||
}
|
||||
|
||||
bool BLEAdvertisingData::addData(uint8_t type, const void* data, uint8_t len)
|
||||
@@ -242,7 +242,7 @@ bool BLEAdvertisingData::setData(uint8_t const * data, uint8_t count)
|
||||
void BLEAdvertisingData::clearData(void)
|
||||
{
|
||||
_count = 0;
|
||||
varclr(_data);
|
||||
arrclr(_data);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
Reference in new issue
Block a user