This commit is contained in:
James 2024-04-25 22:29:46 +01:00
parent c3829c180e
commit c88e078304

View File

@ -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
{
Serial.println("PKT1");
packetstate = 1;
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
{
Serial.println("PKT2");
packetstate = 2;
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
{
Serial.println("PKT3");
uint8_t packet[totalDataSize];
memcpy(packet, packetbuff, totalDataSize);