tidy
This commit is contained in:
parent
fcd2782c08
commit
05c212f01d
@ -123,7 +123,7 @@ void loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void MyNotifyCallback(BLERemoteCharacteristic *pBLERemoteCharacteristic, uint8_t *pData, size_t length, bool isNotify){
|
static void MyNotifyCallback(BLERemoteCharacteristic *pBLERemoteCharacteristic, uint8_t *pData, size_t length, bool isNotify){
|
||||||
hexDump((char*)pData, length);
|
//hexDump((char*)pData, length);
|
||||||
if(!bleCollectPacket((char *)pData, length)){
|
if(!bleCollectPacket((char *)pData, length)){
|
||||||
Serial.println("ERROR: packet could not be collected.");
|
Serial.println("ERROR: packet could not be collected.");
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ bool bleCollectPacket(char *data, uint32_t dataSize) // reconstruct packet, call
|
|||||||
|
|
||||||
static uint32_t totalDataSize = 0;
|
static uint32_t totalDataSize = 0;
|
||||||
bool retVal = false;
|
bool retVal = false;
|
||||||
hexDump(data,dataSize);
|
//hexDump(data,dataSize);
|
||||||
|
|
||||||
if(totalDataSize + dataSize > sizeof(packetbuff)){
|
if(totalDataSize + dataSize > sizeof(packetbuff)){
|
||||||
Serial.printf("ERROR: datasize is overlength.");
|
Serial.printf("ERROR: datasize is overlength.");
|
||||||
|
Loading…
Reference in New Issue
Block a user