Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1702 | - | 1 | |
2 | #include <FastSerial.h> |
||
3 | #include <AP_Common.h> |
||
4 | |||
5 | FastSerialPort0(Serial); |
||
6 | |||
7 | int8_t |
||
8 | menu_test(uint8_t argc, const Menu::arg *argv) |
||
9 | { |
||
10 | int i; |
||
11 | |||
12 | Serial.printf("This is a test with %d arguments\n", argc); |
||
13 | for (i = 1; i < argc; i++) { |
||
14 | Serial.printf("%d: int %ld float ", i, argv[i].i); |
||
15 | Serial.println(argv[i].f, 6); // gross |
||
16 | } |
||
17 | } |
||
18 | |||
19 | int8_t |
||
20 | menu_auto(uint8_t argc, const Menu::arg *argv) |
||
21 | { |
||
22 | Serial.println("auto text"); |
||
23 | } |
||
24 | |||
25 | const struct Menu::command top_menu_commands[] PROGMEM = { |
||
26 | {"*", menu_auto}, |
||
27 | {"test", menu_test}, |
||
28 | }; |
||
29 | |||
30 | MENU(top, "menu", top_menu_commands); |
||
31 | |||
32 | void |
||
33 | setup(void) |
||
34 | { |
||
35 | Serial.begin(38400); |
||
36 | top.run(); |
||
37 | } |
||
38 | |||
39 | void |
||
40 | loop(void) |
||
41 | { |
||
42 | } |
||
43 |