@@ -598,7 +598,7 @@ BLEDevice ATTClass::central()
598
598
return BLEDevice ();
599
599
}
600
600
601
- bool ATTClass::handleNotify (uint16_t handle, const uint8_t * value, int length)
601
+ int ATTClass::handleNotify (uint16_t handle, const uint8_t * value, int length)
602
602
{
603
603
int numNotifications = 0 ;
604
604
@@ -626,10 +626,10 @@ bool ATTClass::handleNotify(uint16_t handle, const uint8_t* value, int length)
626
626
numNotifications++;
627
627
}
628
628
629
- return (numNotifications > 0 );
629
+ return (numNotifications > 0 ) ? length : 0 ;
630
630
}
631
631
632
- bool ATTClass::handleInd (uint16_t handle, const uint8_t * value, int length)
632
+ int ATTClass::handleInd (uint16_t handle, const uint8_t * value, int length)
633
633
{
634
634
int numIndications = 0 ;
635
635
@@ -666,7 +666,7 @@ bool ATTClass::handleInd(uint16_t handle, const uint8_t* value, int length)
666
666
numIndications++;
667
667
}
668
668
669
- return (numIndications > 0 );
669
+ return (numIndications > 0 ) ? length : 0 ;
670
670
}
671
671
672
672
void ATTClass::error (uint16_t connectionHandle, uint8_t dlen, uint8_t data[])
0 commit comments