mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-14 13:57:24 +00:00
Add Adhoc Ping and resolve error with std::string sanitized
This commit is contained in:
@@ -249,11 +249,11 @@ void menuHandler::homeBaseMenu()
|
||||
static const char **optionsArrayPtr;
|
||||
|
||||
if (kb_found) {
|
||||
static const char *optionsArray[] = {"Back", "Sleep Screen", "New Preset Msg", "New Freetext Msg"};
|
||||
static const char *optionsArray[] = {"Back", "Sleep Screen", "Send Adhoc Ping", "New Preset Msg", "New Freetext Msg"};
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 4;
|
||||
} else {
|
||||
static const char *optionsArray[] = {"Back", "Sleep Screen", "New Preset Msg"};
|
||||
static const char *optionsArray[] = {"Back", "Sleep Screen", "Send Adhoc Ping", "New Preset Msg"};
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 3;
|
||||
}
|
||||
@@ -261,8 +261,15 @@ void menuHandler::homeBaseMenu()
|
||||
if (selected == 1) {
|
||||
screen->setOn(false);
|
||||
} else if (selected == 2) {
|
||||
cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);
|
||||
service->refreshLocalMeshNode();
|
||||
if (service->trySendPosition(NODENUM_BROADCAST, true)) {
|
||||
LOG_INFO("Position Update Sent");
|
||||
} else {
|
||||
LOG_INFO("Node Info Update Sent");
|
||||
}
|
||||
} else if (selected == 3) {
|
||||
cannedMessageModule->LaunchWithDestination(NODENUM_BROADCAST);
|
||||
} else if (selected == 4) {
|
||||
cannedMessageModule->LaunchFreetextWithDestination(NODENUM_BROADCAST);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user