-
Notifications
You must be signed in to change notification settings - Fork 7
transferBack()
CreateiveRobotics edited this page Mar 7, 2020
·
2 revisions
bool transferBack(const commandList_t \*commands, uint32_t size, String newName)
Transfer this Commander object back to an old command list, and give it a new name that will appear when the command prompt prints.
This is normally used in conjunction with transferTo() when working with multiple command lists.
Example:
Cmdr.println("Passing to sub command handler");
if(Cmdr.transferTo(subCommands, numOfSubCmds, "sub")){
//commander returns true if it is passing back control
//If not we remain in the sub command system.
Cmdr.transferBack(masterCommands, numOfMasterCmds, "Cmd");
}