Move print helpers to Hotdog.ino

This commit is contained in:
2023-12-09 09:56:47 +11:00
parent 207ffe9cc9
commit 33551d7e01
2 changed files with 22 additions and 19 deletions

View File

@@ -166,18 +166,3 @@ void calculateCRC() { // must be called after the buffer has been filled
buf[length + 2] = checksum1; // Checksum
buf[length + 3] = checksum2; // Checksum
}
void printHex(uint8_t num) { //print a byte as two hex chars
char hexCar[3];
sprintf(hexCar, "%02X", num);
Serial.print(hexCar);
}
void printBuffer() //print a byte array as hex chars
{
uint8_t bytecount = buf[0] + 3;
for (int i = 0; i < bytecount; i++) {
printHex(buf[i]);
}
Serial.println();
}