-
-
Notifications
You must be signed in to change notification settings - Fork 197
Open
Description
I'm trying to get this library set-up so that I can initialize a rather complex menu structure in a separate file. How can I do this? It doesn't seem possible that I can return nav:
MenuConfig.cpp
Menu::navRoot CreateMenu()
{
// create menu structure
NAVROOT(nav, mainMenu, MAX_DEPTH, in, out);
return nav;
}
main.cpp
Menu::navRoot nav = CreateMenu();
void setup(void)
{
// set up Serial, etc.
}
void loop(void)
{
nav.poll();
}
I've tried several ways, like passing references, etc. The program seems to crash in the loop.
Is there a way to do this or do am I forced to have a gigantic main.cpp
file?!
Metadata
Metadata
Assignees
Labels
No labels