Add groups to payloadVariant

This commit is contained in:
Jm Casler
2022-02-20 01:33:49 -08:00
parent d416f28341
commit 3fdd425634
4 changed files with 21 additions and 3 deletions

View File

@@ -140,11 +140,18 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
myNodeInfo.has_gps = gps && gps->isConnected(); // Update with latest GPS connect info
fromRadioScratch.which_payloadVariant = FromRadio_my_info_tag;
fromRadioScratch.my_info = myNodeInfo;
state = STATE_SEND_NODEINFO;
state = STATE_SEND_GROUPS;
service.refreshMyNodeInfo(); // Update my NodeInfo because the client will be asking for it soon.
break;
case STATE_SEND_GROUPS:
fromRadioScratch.which_payloadVariant = FromRadio_groups_tag;
fromRadioScratch.groups = ourGroupInfo;
state = STATE_SEND_NODEINFO;
break;
case STATE_SEND_NODEINFO: {
const NodeInfo *info = nodeInfoForPhone;
nodeInfoForPhone = NULL; // We just consumed a nodeinfo, will need a new one next time