CCAZE31 / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

ArduPlane compile error - include/menu.h not found - patch attached #836

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
While building with cmake/make, both the master and ArduPlane-Release branch 
fail with an error about include/menu.h not found.

I'm not sure if I'm doing anything wrong, but here's a patch I made to fix my 
build...

To easily browse my proposed change see this github link: 
https://github.com/geeksville/ardupilot/commit/7b9066d570cef78fd2104d051433154a6
d3e1883

From 4bdfcfc61580501154906470c7219f442b7b8a99 Mon Sep 17 00:00:00 2001
From: Kevin Hester <kevinh@geeksville.com>
Date: Sun, 9 Dec 2012 20:55:23 -0800
Subject: [PATCH 62/62] Fix build (I can't find include/menu.h anywhere...)

---
 libraries/AP_Menu/AP_Menu.cpp |    2 +-
 libraries/AP_Menu/AP_Menu.h   |    5 +++--
 libraries/AP_Var/AP_Var.h     |    3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/libraries/AP_Menu/AP_Menu.cpp b/libraries/AP_Menu/AP_Menu.cpp
index 54a3875..85a021d 100644
--- a/libraries/AP_Menu/AP_Menu.cpp
+++ b/libraries/AP_Menu/AP_Menu.cpp
@@ -16,7 +16,7 @@
 // statics
 char Menu::_inbuf[MENU_COMMANDLINE_MAX];
 Menu::arg Menu::_argv[MENU_ARGS_MAX + 1];
-FastSerial *Menu::_port;
+BetterStream *Menu::_port;

 // constructor
diff --git a/libraries/AP_Menu/AP_Menu.h b/libraries/AP_Menu/AP_Menu.h
index 2eb7fe2..ef5436f 100644
--- a/libraries/AP_Menu/AP_Menu.h
+++ b/libraries/AP_Menu/AP_Menu.h
@@ -17,6 +17,7 @@
 #define __AP_MENU_H__

 #include <inttypes.h>
+#include <BetterStream.h>

 #define MENU_COMMANDLINE_MAX    32      ///< maximum input line length
 #define MENU_ARGS_MAX                   4       ///< maximum number of arguments
@@ -56,7 +57,7 @@ public:
     ///
     typedef int8_t (*func)(uint8_t argc, const struct arg *argv);

-   static void set_port(FastSerial *port) {
+   static void set_port(BetterStream *port) {
        _port = port;
    }

@@ -126,7 +127,7 @@ private:
     static arg              _argv[MENU_ARGS_MAX + 1];                   ///< arguments

    // port to run on
-   static FastSerial       *_port;
+   static BetterStream     *_port;
 };

 /// Macros used to define a menu.
diff --git a/libraries/AP_Var/AP_Var.h b/libraries/AP_Var/AP_Var.h
index 3426bfb..d27a30a 100644
--- a/libraries/AP_Var/AP_Var.h
+++ b/libraries/AP_Var/AP_Var.h
@@ -943,7 +943,8 @@ extern AP_Float AP_Float_zero;
 extern void     AP_Var_print(AP_Var *vp);

 #ifndef __AP_COMMON_MENU_H
-#include "include/menu.h"
+// #include "include/menu.h"
+#include <AP_Menu.h>
 #endif

 /// Menu function for setting an AP_Var.
-- 
1.7.9.5

Original issue reported on code.google.com by UncleSo...@gmail.com on 24 Dec 2012 at 2:44