mirror of https://github.com/ArduPilot/ardupilot
AP_Menu: use ARRAY_SIZE macro
This commit is contained in:
parent
0471de2342
commit
fdc6a75124
|
@ -168,10 +168,10 @@ private:
|
||||||
///
|
///
|
||||||
#define MENU(name, prompt, commands) \
|
#define MENU(name, prompt, commands) \
|
||||||
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
||||||
static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]))
|
static Menu name(__menu_name__ ## name, commands, ARRAY_SIZE(commands))
|
||||||
|
|
||||||
#define MENU2(name, prompt, commands, preprompt) \
|
#define MENU2(name, prompt, commands, preprompt) \
|
||||||
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
||||||
static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]), preprompt)
|
static Menu name(__menu_name__ ## name, commands, ARRAY_SIZE(commands), preprompt)
|
||||||
|
|
||||||
#endif // __AP_COMMON_MENU_H__
|
#endif // __AP_COMMON_MENU_H__
|
||||||
|
|
Loading…
Reference in New Issue