* Mesh: new sendFlood() overload with transport codes.

* BaseChatMesh:  sendFloodScoped(), for overriding with some outbound 'scope' / TransportKey
* companion: new 'send_scope' variable.
This commit is contained in:
Scott Powell 2025-11-04 01:21:56 +11:00
parent ecd30f4d36
commit d9ff3a4d02
8 changed files with 91 additions and 12 deletions

View file

@ -12,6 +12,13 @@ uint16_t TransportKey::calcTransportCode(const mesh::Packet* packet) const {
return code;
}
bool TransportKey::isNull() const {
for (int i = 0; i < sizeof(key); i++) {
if (key[i]) return false;
}
return true; // key is all zeroes
}
void TransportKeyStore::putCache(uint16_t id, const TransportKey& key) {
if (num_cache < MAX_TKS_ENTRIES) {
cache_ids[num_cache] = id;