Open jjpavlik opened 4 years ago
Right now each possible response routine is sending the packet on its own. This make it really hard to for example track the amount of bytes being sent, and make the code a bit messy. Maybe there should be something like:
boolean send_packet(byte *packet, byte size){ sent = Serial.write(packet, size); bytes_sent = bytes_sent+sent; if(sent == size) { return true; } bad_writes++; return false; }
Right now each possible response routine is sending the packet on its own. This make it really hard to for example track the amount of bytes being sent, and make the code a bit messy. Maybe there should be something like:
boolean send_packet(byte *packet, byte size){ sent = Serial.write(packet, size); bytes_sent = bytes_sent+sent; if(sent == size) { return true; } bad_writes++; return false; }