AP_Menu: create new library with menu from AP_Common
This commit is contained in:
parent
eb0dd45a11
commit
1bf21aae20
@ -34,7 +34,6 @@ typedef struct {
|
|||||||
} prog_char_t;
|
} prog_char_t;
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "include/menu.h" /// simple menu subsystem
|
|
||||||
#include "c++.h" // c++ additions
|
#include "c++.h" // c++ additions
|
||||||
//#include "AP_Vector.h"
|
//#include "AP_Vector.h"
|
||||||
//#include "AP_Loop.h"
|
//#include "AP_Loop.h"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
#include "include/menu.h"
|
#include "AP_Menu.h"
|
||||||
|
|
||||||
// statics
|
// statics
|
||||||
char Menu::_inbuf[MENU_COMMANDLINE_MAX];
|
char Menu::_inbuf[MENU_COMMANDLINE_MAX];
|
@ -13,8 +13,8 @@
|
|||||||
/// Arguments passed to the handler function are pre-converted to both
|
/// Arguments passed to the handler function are pre-converted to both
|
||||||
/// long and float for convenience.
|
/// long and float for convenience.
|
||||||
|
|
||||||
#ifndef __AP_COMMON_MENU_H
|
#ifndef __AP_MENU_H__
|
||||||
#define __AP_COMMON_MENU_H
|
#define __AP_MENU_H__
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
@ -140,4 +140,4 @@ private:
|
|||||||
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
static const char __menu_name__ ## name[] PROGMEM = prompt; \
|
||||||
static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]), preprompt)
|
static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]), preprompt)
|
||||||
|
|
||||||
#endif
|
#endif // __AP_COMMON_MENU_H__
|
1
libraries/AP_Menu/examples/menu/Makefile
Normal file
1
libraries/AP_Menu/examples/menu/Makefile
Normal file
@ -0,0 +1 @@
|
|||||||
|
include ../../../AP_Common/Arduino.mk
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
#include <FastSerial.h>
|
#include <FastSerial.h>
|
||||||
#include <AP_Common.h>
|
#include <AP_Common.h>
|
||||||
|
#include <AP_Param.h>
|
||||||
|
#include <AP_Menu.h>
|
||||||
|
|
||||||
FastSerialPort0(Serial);
|
FastSerialPort0(Serial);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user