* proposed change for re-trying reciprocal path transmit

This commit is contained in:
Scott Powell
2025-09-08 19:22:59 +10:00
parent 6a9dedf0b4
commit 74dea260e5
5 changed files with 35 additions and 13 deletions

View File

@@ -217,18 +217,18 @@ protected:
saveContacts();
}
bool processAck(const uint8_t *data) override {
ContactInfo* processAck(const uint8_t *data) override {
if (memcmp(data, &expected_ack_crc, 4) == 0) { // got an ACK from recipient
Serial.printf(" Got ACK! (round trip: %d millis)\n", _ms->getMillis() - last_msg_sent);
// NOTE: the same ACK can be received multiple times!
expected_ack_crc = 0; // reset our expected hash, now that we have received ACK
return true;
return NULL; // TODO: really should return ContactInfo pointer
}
//uint32_t crc;
//memcpy(&crc, data, 4);
//MESH_DEBUG_PRINTLN("unknown ACK received: %08X (expected: %08X)", crc, expected_ack_crc);
return false;
return NULL;
}
void onMessageRecv(const ContactInfo& from, mesh::Packet* pkt, uint32_t sender_timestamp, const char *text) override {