AP_Menu: removed example sketch

not very useful
This commit is contained in:
Andrew Tridgell 2015-06-01 17:34:34 +10:00
parent 5c86005160
commit 9fa1e15238
4 changed files with 0 additions and 63 deletions

View File

@ -1 +0,0 @@
include ../../../../mk/apm.mk

View File

@ -1,8 +0,0 @@
LIBRARIES += AP_Common
LIBRARIES += AP_HAL
LIBRARIES += AP_HAL_AVR
LIBRARIES += AP_Math
LIBRARIES += AP_Menu
LIBRARIES += AP_Param
LIBRARIES += AP_Progmem
LIBRARIES += StorageManager

View File

@ -1,54 +0,0 @@
#include <AP_Common.h>
#include <AP_Math.h>
#include <AP_Param.h>
#include <StorageManager.h>
#include <AP_Progmem.h>
#include <AP_Menu.h>
#include <AP_HAL.h>
#include <AP_HAL_AVR.h>
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
int8_t
menu_test(uint8_t argc, const Menu::arg *argv)
{
int i;
hal.console->printf("This is a test with %d arguments\n", argc);
for (i = 1; i < argc; i++) {
hal.console->printf("%d: int %ld float ", i, argv[i].i);
hal.console->println(argv[i].f, 6); // gross
}
return 0;
}
int8_t
menu_auto(uint8_t argc, const Menu::arg *argv)
{
hal.console->println("auto text");
return 0;
}
const struct Menu::command top_menu_commands[] PROGMEM = {
{"*", menu_auto},
{"test", menu_test},
};
MENU(top, "menu", top_menu_commands);
void
setup(void)
{
hal.console->println_P(PSTR("AP_Menu unit test"));
top.run();
}
void
loop(void)
{
hal.console->printf("not reached\n");
}
AP_HAL_MAIN();