From c18fd764491d0a39b33dda0d6ccc164627610f08 Mon Sep 17 00:00:00 2001 From: DrZiplok Date: Mon, 24 Jan 2011 02:44:31 +0000 Subject: [PATCH] Try to pre-empt subsequent inclusions of wiring.h by grabbing it here and giving ourselves a chance to undo some of the less well-advised macros it defines. git-svn-id: https://arducopter.googlecode.com/svn/trunk@1554 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_Common/AP_Common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_Common/AP_Common.h b/libraries/AP_Common/AP_Common.h index d2fe3fdcb9..3f8f8dae16 100644 --- a/libraries/AP_Common/AP_Common.h +++ b/libraries/AP_Common/AP_Common.h @@ -15,6 +15,12 @@ #ifndef _AP_COMMON_H #define _AP_COMMON_H +// Get the common arduino functions +#include "wiring.h" +// ... and remove some of their stupid macros +#undef round +#undef abs + #include #include "include/menu.h" /// simple menu subsystem #include "c++.h" // c++ additions @@ -22,6 +28,8 @@ //#include "AP_Loop.h" #include "AP_Var.h" + + //////////////////////////////////////////////////////////////////////////////// /// @name Warning control //@{