AP_Menu: create new library with menu from AP_Common

This commit is contained in:
Pat Hickey 2012-10-18 20:49:36 -07:00
parent eb0dd45a11
commit 1bf21aae20
5 changed files with 7 additions and 5 deletions

View File

@ -34,7 +34,6 @@ typedef struct {
} prog_char_t;
#include <stdint.h>
#include "include/menu.h" /// simple menu subsystem
#include "c++.h" // c++ additions
//#include "AP_Vector.h"
//#include "AP_Loop.h"

View File

@ -11,7 +11,7 @@
#include <string.h>
#include <avr/pgmspace.h>
#include "include/menu.h"
#include "AP_Menu.h"
// statics
char Menu::_inbuf[MENU_COMMANDLINE_MAX];

View File

@ -13,8 +13,8 @@
/// Arguments passed to the handler function are pre-converted to both
/// long and float for convenience.
#ifndef __AP_COMMON_MENU_H
#define __AP_COMMON_MENU_H
#ifndef __AP_MENU_H__
#define __AP_MENU_H__
#include <inttypes.h>
@ -140,4 +140,4 @@ private:
static const char __menu_name__ ## name[] PROGMEM = prompt; \
static Menu name(__menu_name__ ## name, commands, sizeof(commands) / sizeof(commands[0]), preprompt)
#endif
#endif // __AP_COMMON_MENU_H__

View File

@ -0,0 +1 @@
include ../../../AP_Common/Arduino.mk

View File

@ -1,6 +1,8 @@
#include <FastSerial.h>
#include <AP_Common.h>
#include <AP_Param.h>
#include <AP_Menu.h>
FastSerialPort0(Serial);