APM:Libraries
Classes | Macros
AP_Menu.h File Reference
#include <inttypes.h>
#include <AP_HAL/AP_HAL.h>
Include dependency graph for AP_Menu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Menu
 Class defining and handling one menu tree. More...
 
struct  Menu::arg
 
struct  Menu::command
 

Macros

#define MENU_COMMANDLINE_MAX   32
 maximum input line length More...
 
#define MENU_ARGS_MAX   3
 maximum number of arguments More...
 
#define MENU_COMMAND_MAX   14
 maximum size of a command name More...
 
#define MENU(name, prompt, commands)
 
#define MENU2(name, prompt, commands, preprompt)
 

Macro Definition Documentation

◆ MENU

#define MENU (   name,
  prompt,
  commands 
)
Value:
static const char __menu_name__ ## name[] = prompt; \
static Menu name(__menu_name__ ## name, commands, ARRAY_SIZE(commands))
Menu_Commands commands
Definition: RCOutput.cpp:33
const char * name
Definition: BusTest.cpp:11
#define ARRAY_SIZE(_arr)
Definition: AP_Common.h:80
Class defining and handling one menu tree.
Definition: AP_Menu.h:23

Macros used to define a menu.

The commands argument should be an arary of Menu::command structures, one per command name. The array does not need to be terminated with any special record.

Use name.run() to run the menu.

The MENU2 macro supports the optional pre-prompt printing function.

Definition at line 165 of file AP_Menu.h.

◆ MENU2

#define MENU2 (   name,
  prompt,
  commands,
  preprompt 
)
Value:
static const char __menu_name__ ## name[] = prompt; \
static Menu name(__menu_name__ ## name, commands, ARRAY_SIZE(commands), preprompt)
Menu_Commands commands
Definition: RCOutput.cpp:33
const char * name
Definition: BusTest.cpp:11
#define ARRAY_SIZE(_arr)
Definition: AP_Common.h:80
Class defining and handling one menu tree.
Definition: AP_Menu.h:23

Definition at line 169 of file AP_Menu.h.

◆ MENU_ARGS_MAX

#define MENU_ARGS_MAX   3

maximum number of arguments

Definition at line 19 of file AP_Menu.h.

◆ MENU_COMMAND_MAX

#define MENU_COMMAND_MAX   14

maximum size of a command name

Definition at line 20 of file AP_Menu.h.

◆ MENU_COMMANDLINE_MAX

#define MENU_COMMANDLINE_MAX   32

maximum input line length

Definition at line 18 of file AP_Menu.h.