we now reply to owner messages with our owner

This commit is contained in:
geeksville
2020-02-06 11:07:44 -08:00
parent 2792e2148f
commit 61a88a343e
4 changed files with 9 additions and 4 deletions

View File

@@ -67,6 +67,11 @@ void MeshService::loop()
while ((mp = fromRadioQueue.dequeuePtr(0)) != NULL)
{
nodeDB.updateFrom(*mp); // update our DB state based off sniffing every RX packet from the radio
if(mp->has_payload && mp->payload.which_variant == SubPacket_user_tag && mp->to == NODENUM_BROADCAST) {
// Someone just sent us a User, reply with our Owner
DEBUG_MSG("Received broadcast Owner from 0x%x, replying with our owner\n", mp->from);
sendOurOwner(mp->from);
}
fromNum++;
assert(toPhoneQueue.enqueue(mp, 0) == pdTRUE); // FIXME, instead of failing for full queue, delete the oldest mssages