2010-09-24 02:50:02 -03:00
|
|
|
|
|
|
|
#include <FastSerial.h>
|
|
|
|
#include <AP_Common.h>
|
|
|
|
|
|
|
|
FastSerialPort0(Serial);
|
|
|
|
|
2010-12-19 22:34:46 -04:00
|
|
|
int8_t
|
2010-09-24 02:50:02 -03:00
|
|
|
menu_test(uint8_t argc, const Menu::arg *argv)
|
|
|
|
{
|
2012-08-17 03:18:11 -03:00
|
|
|
int i;
|
2010-09-24 02:50:02 -03:00
|
|
|
|
2011-10-28 15:43:43 -03:00
|
|
|
Serial.printf("This is a test with %d arguments\n", argc);
|
|
|
|
for (i = 1; i < argc; i++) {
|
|
|
|
Serial.printf("%d: int %ld float ", i, argv[i].i);
|
|
|
|
Serial.println(argv[i].f, 6); // gross
|
|
|
|
}
|
2010-09-24 02:50:02 -03:00
|
|
|
}
|
|
|
|
|
2010-12-19 22:34:46 -04:00
|
|
|
int8_t
|
2010-09-24 03:18:59 -03:00
|
|
|
menu_auto(uint8_t argc, const Menu::arg *argv)
|
|
|
|
{
|
2011-10-28 15:43:43 -03:00
|
|
|
Serial.println("auto text");
|
2010-09-24 03:18:59 -03:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:50:02 -03:00
|
|
|
const struct Menu::command top_menu_commands[] PROGMEM = {
|
2011-10-28 15:43:43 -03:00
|
|
|
{"*", menu_auto},
|
2012-08-17 03:18:11 -03:00
|
|
|
{"test", menu_test},
|
2010-09-24 02:50:02 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
MENU(top, "menu", top_menu_commands);
|
|
|
|
|
|
|
|
void
|
|
|
|
setup(void)
|
|
|
|
{
|
2011-10-28 15:43:43 -03:00
|
|
|
Serial.begin(38400);
|
|
|
|
top.run();
|
2010-09-24 02:50:02 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
loop(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|