tweak LoRa airtime debug

This commit is contained in:
Timm Bogner 2023-02-26 09:27:47 -06:00
parent 9bb01738c0
commit 4d105acd13

View File

@ -185,7 +185,8 @@ crcResult transmitLoRa(uint16_t *destMac, DataReading *packet, uint8_t len)
// printf("CRC: %02X : %d\n",calcCRC, i);
calcCRC = crc16_update(calcCRC, pkt[i]);
}
if(*destMac == 0xFFFF) {
if (*destMac == 0xFFFF)
{
calcCRC = crc16_update(calcCRC, 0xA1);
}
pkt[(len * sizeof(DataReading) + 4)] = (calcCRC >> 8); // Append calculated CRC to the last 2 bytes of the packet
@ -615,7 +616,7 @@ crcResult handleLoRa()
{
if (tx_time_set)
{
DBG("ToA: " + String(millis() - tx_start_time));
DBG("LoRa airtime: " + String(millis() - tx_start_time) + "ms");
tx_time_set = false;
}
radio.startReceive(); // return to listen mode