tidy
This commit is contained in:
parent
c3829c180e
commit
c88e078304
@ -177,7 +177,6 @@ bool bleCollectPacket(char *data, uint32_t dataSize) // reconstruct packet, call
|
|||||||
}
|
}
|
||||||
else if (data[0] == 0xdd && packetstate == 0) // probably got 1st half of packet
|
else if (data[0] == 0xdd && packetstate == 0) // probably got 1st half of packet
|
||||||
{
|
{
|
||||||
Serial.println("PKT1");
|
|
||||||
packetstate = 1;
|
packetstate = 1;
|
||||||
for (uint8_t i = 0; i < dataSize; i++)
|
for (uint8_t i = 0; i < dataSize; i++)
|
||||||
{
|
{
|
||||||
@ -193,7 +192,6 @@ bool bleCollectPacket(char *data, uint32_t dataSize) // reconstruct packet, call
|
|||||||
}
|
}
|
||||||
else if (data[dataSize - 1] == 0x77 && packetstate == 1) //probably got 2nd half of the packet
|
else if (data[dataSize - 1] == 0x77 && packetstate == 1) //probably got 2nd half of the packet
|
||||||
{
|
{
|
||||||
Serial.println("PKT2");
|
|
||||||
packetstate = 2;
|
packetstate = 2;
|
||||||
for (uint8_t i = 0; i < dataSize; i++)
|
for (uint8_t i = 0; i < dataSize; i++)
|
||||||
{
|
{
|
||||||
@ -205,7 +203,6 @@ bool bleCollectPacket(char *data, uint32_t dataSize) // reconstruct packet, call
|
|||||||
|
|
||||||
if (packetstate == 2) //got full packet
|
if (packetstate == 2) //got full packet
|
||||||
{
|
{
|
||||||
Serial.println("PKT3");
|
|
||||||
uint8_t packet[totalDataSize];
|
uint8_t packet[totalDataSize];
|
||||||
memcpy(packet, packetbuff, totalDataSize);
|
memcpy(packet, packetbuff, totalDataSize);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user