diff --git a/libraries/AP_Common/AP_Common.h b/libraries/AP_Common/AP_Common.h index 98cb5bd6188cb80ce49d9946b46773029664b4b5..0cfdbc3da1ad34c98ba3f49821e19dc6d71d091e 100644 --- a/libraries/AP_Common/AP_Common.h +++ b/libraries/AP_Common/AP_Common.h @@ -34,7 +34,6 @@ typedef struct { } prog_char_t; #include <stdint.h> -#include "include/menu.h" /// simple menu subsystem #include "c++.h" // c++ additions //#include "AP_Vector.h" //#include "AP_Loop.h" diff --git a/libraries/AP_Common/menu.cpp b/libraries/AP_Menu/AP_Menu.cpp similarity index 99% rename from libraries/AP_Common/menu.cpp rename to libraries/AP_Menu/AP_Menu.cpp index 784dd6064333b5ed60111c54d0a8ee3469f28466..ab912dac2d3909eed0ef69806a0c06e229934ef2 100644 --- a/libraries/AP_Common/menu.cpp +++ b/libraries/AP_Menu/AP_Menu.cpp @@ -11,7 +11,7 @@ #include <string.h> #include <avr/pgmspace.h> -#include "include/menu.h" +#include "AP_Menu.h" // statics char Menu::_inbuf[MENU_COMMANDLINE_MAX]; diff --git a/libraries/AP_Common/include/menu.h b/libraries/AP_Menu/AP_Menu.h similarity index 98% rename from libraries/AP_Common/include/menu.h rename to libraries/AP_Menu/AP_Menu.h index 452daa05622d75d44c5d18052f10b05367e446ba..7a95403769d507d16d0e310a848d9af203b156fd 100644 --- a/libraries/AP_Common/include/menu.h +++ b/libraries/AP_Menu/AP_Menu.h @@ -13,8 +13,8 @@ /// Arguments passed to the handler function are pre-converted to both /// long and float for convenience. -#ifndef __AP_COMMON_MENU_H -#define __AP_COMMON_MENU_H +#ifndef __AP_MENU_H__ +#define __AP_MENU_H__ #include <inttypes.h> @@ -140,4 +140,4 @@ private: static const char __menu_name__ ## name[] PROGMEM = prompt; \ static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]), preprompt) -#endif +#endif // __AP_COMMON_MENU_H__ diff --git a/libraries/AP_Menu/examples/menu/Makefile b/libraries/AP_Menu/examples/menu/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d1f40fd90f274655351748fc2e7a165d4eff41e6 --- /dev/null +++ b/libraries/AP_Menu/examples/menu/Makefile @@ -0,0 +1 @@ +include ../../../AP_Common/Arduino.mk diff --git a/libraries/AP_Common/examples/menu/menu.pde b/libraries/AP_Menu/examples/menu/menu.pde similarity index 94% rename from libraries/AP_Common/examples/menu/menu.pde rename to libraries/AP_Menu/examples/menu/menu.pde index 05a4dfdbee3c7ba7b642a08f4e4ff8f15788d1cd..32d016e5354f3a2f6b4a079ace9c855cf89b6d20 100644 --- a/libraries/AP_Common/examples/menu/menu.pde +++ b/libraries/AP_Menu/examples/menu/menu.pde @@ -1,6 +1,8 @@ #include <FastSerial.h> #include <AP_Common.h> +#include <AP_Param.h> +#include <AP_Menu.h> FastSerialPort0(Serial);