* companion: optional double ACKs, new prefs.multi_acks

This commit is contained in:
Scott Powell 2025-07-16 19:25:28 +10:00
parent 6bc8dd28d4
commit 5881b04a31
5 changed files with 23 additions and 9 deletions

View file

@ -36,11 +36,15 @@ void BaseChatMesh::sendAckTo(const ContactInfo& dest, uint32_t ack_hash) {
mesh::Packet* ack = createAck(ack_hash);
if (ack) sendFlood(ack, TXT_ACK_DELAY);
} else {
mesh::Packet* a1 = createMultiAck(ack_hash, 1);
if (a1) sendDirect(a1, dest.out_path, dest.out_path_len, TXT_ACK_DELAY);
uint32_t d = TXT_ACK_DELAY;
if (getExtraAckTransmitCount() > 0) {
mesh::Packet* a1 = createMultiAck(ack_hash, 1);
if (a1) sendDirect(a1, dest.out_path, dest.out_path_len, d);
d += 300;
}
mesh::Packet* a2 = createAck(ack_hash);
if (a2) sendDirect(a2, dest.out_path, dest.out_path_len, TXT_ACK_DELAY + 300);
if (a2) sendDirect(a2, dest.out_path, dest.out_path_len, d);
}
}