You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
561 B
39 lines
561 B
15 years ago
|
|
||
|
#include <FastSerial.h>
|
||
|
#include <AP_Common.h>
|
||
|
|
||
|
#include <avr/pgmspace.h>
|
||
|
|
||
|
FastSerialPort0(Serial);
|
||
|
|
||
|
int
|
||
|
menu_test(uint8_t argc, const Menu::arg *argv)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const struct Menu::command top_menu_commands[] PROGMEM = {
|
||
|
{"test", menu_test},
|
||
|
};
|
||
|
|
||
|
MENU(top, "menu", top_menu_commands);
|
||
|
|
||
|
void
|
||
|
setup(void)
|
||
|
{
|
||
|
Serial.begin(38400);
|
||
|
top.run();
|
||
|
}
|
||
|
|
||
|
void
|
||
|
loop(void)
|
||
|
{
|
||
|
}
|
||
|
|