Init all data members befor pushing it into the buffer

This commit is contained in:
Thomas Basler 2023-09-30 10:48:41 +02:00
parent d4345917da
commit 32d91379fa

View File

@ -103,6 +103,8 @@ void HoymilesRadio_CMT::loop()
f.len = _radio->getDynamicPayloadSize(); f.len = _radio->getDynamicPayloadSize();
f.channel = _radio->getChannel(); f.channel = _radio->getChannel();
f.rssi = _radio->getRssiDBm(); f.rssi = _radio->getRssiDBm();
f.wasReceived = false;
f.mainCmd = 0x00;
if (f.len > MAX_RF_PAYLOAD_SIZE) { if (f.len > MAX_RF_PAYLOAD_SIZE) {
f.len = MAX_RF_PAYLOAD_SIZE; f.len = MAX_RF_PAYLOAD_SIZE;
} }