Add debug output of the group names.

This commit is contained in:
Jm Casler 2022-02-20 10:47:57 -08:00
parent 0133186f70
commit 1e6e3805ad

View File

@ -12,8 +12,19 @@ GroupPlugin *groupPlugin;
GroupPlugin::GroupPlugin() GroupPlugin::GroupPlugin()
: ProtobufPlugin("group", PortNum_GROUP_APP, GroupInfo_fields), concurrency::OSThread("GroupPlugin") : ProtobufPlugin("group", PortNum_GROUP_APP, GroupInfo_fields), concurrency::OSThread("GroupPlugin")
{ {
//isPromiscuous = true; // We always want to update our nodedb, even if we are sniffing on others
//setIntervalFromNow(60 * 1000); // Send our initial position 60 seconds after we start (to give GPS time to setup) strcpy(ourGroupInfo.group[0], "Avocado");
strcpy(ourGroupInfo.group[1], "Backberries");
strcpy(ourGroupInfo.group[2], "Cantaloupe");
strcpy(ourGroupInfo.group[3], "Durian");
strcpy(ourGroupInfo.group[4], "Elderberry");
strcpy(ourGroupInfo.group[5], "Fig");
strcpy(ourGroupInfo.group[6], "Guava");
strcpy(ourGroupInfo.group[7], "Honeydew");
strcpy(ourGroupInfo.group[8], "Jackfruit");
strcpy(ourGroupInfo.group[9], "Kiwifruit");
strcpy(ourGroupInfo.group[10], "TellJmYouSeeThis");
} }
bool GroupPlugin::handleReceivedProtobuf(const MeshPacket &mp, GroupInfo *pptr) bool GroupPlugin::handleReceivedProtobuf(const MeshPacket &mp, GroupInfo *pptr)
@ -36,14 +47,23 @@ int32_t GroupPlugin::runOnce()
{ {
NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum()); NodeInfo *node = nodeDB.getNode(nodeDB.getNodeNum());
//ourGroupInfo.group[0] = "20";
//ourGroupInfo.group_count;
sprintf(ourGroupInfo.group[0], "Group 0");
sprintf(ourGroupInfo.group[1], "Group 1");
sprintf(ourGroupInfo.group[2], "Group 2");
sprintf(ourGroupInfo.group[3], "Group 3");
sprintf(ourGroupInfo.group[4], "Group 4");
return 5000; // to save power only wake for our callback occasionally DEBUG_MSG("Group 0=%s\n", ourGroupInfo.group[0]);
DEBUG_MSG("Group 1=%s\n", ourGroupInfo.group[1]);
DEBUG_MSG("Group 2=%s\n", ourGroupInfo.group[2]);
DEBUG_MSG("Group 3=%s\n", ourGroupInfo.group[3]);
DEBUG_MSG("Group 4=%s\n", ourGroupInfo.group[4]);
DEBUG_MSG("Group 5=%s\n", ourGroupInfo.group[5]);
DEBUG_MSG("Group 6=%s\n", ourGroupInfo.group[6]);
DEBUG_MSG("Group 7=%s\n", ourGroupInfo.group[7]);
DEBUG_MSG("Group 8=%s\n", ourGroupInfo.group[8]);
DEBUG_MSG("Group 9=%s\n", ourGroupInfo.group[9]);
DEBUG_MSG("Group 10=%s\n", ourGroupInfo.group[10]);
DEBUG_MSG("Group 11=%s\n", ourGroupInfo.group[11]);
DEBUG_MSG("group plugin runOnce()\n");
return 50000; // to save power only wake for our callback occasionally
} }