mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
move AP_Var code and example into libraries/AP_Var
you can use AP_Var by defining USE_AP_VAR
This commit is contained in:
parent
23ed5c2cee
commit
74bbc72b11
@ -38,8 +38,13 @@ typedef struct {
|
||||
#include "c++.h" // c++ additions
|
||||
//#include "AP_Vector.h"
|
||||
//#include "AP_Loop.h"
|
||||
#include "AP_Param.h"
|
||||
|
||||
// default to AP_Param system, unless USE_AP_VAR is defined
|
||||
#ifdef USE_AP_VAR
|
||||
#include "AP_Var.h"
|
||||
#else
|
||||
#include "AP_Param.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @name Warning control
|
||||
|
@ -1,2 +0,0 @@
|
||||
BOARD = mega
|
||||
include ../../Arduino.mk
|
@ -1,5 +1,3 @@
|
||||
#if 0 // we can't build this and AP_Param due to AP_Common.h conflicts
|
||||
|
||||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
//
|
||||
// This is free software; you can redistribute it and/or modify it under
|
||||
@ -11,11 +9,10 @@
|
||||
/// @file AP_Var.cpp
|
||||
/// @brief The AP variable store.
|
||||
|
||||
#define NO_AP_PARAM
|
||||
#define USE_AP_VAR
|
||||
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Var.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -825,4 +822,3 @@ AP_Var_typesetup::AP_Var_typesetup(void)
|
||||
/// Cause the AP_Var_typesetup constructor to be run.
|
||||
///
|
||||
static AP_Var_typesetup _typesetup __attribute__((used));
|
||||
#endif
|
@ -943,7 +943,7 @@ extern AP_Float AP_Float_zero;
|
||||
extern void AP_Var_print(AP_Var *vp);
|
||||
|
||||
#ifndef __AP_COMMON_MENU_H
|
||||
# error Must include menu.h
|
||||
#include "include/menu.h"
|
||||
#endif
|
||||
|
||||
/// Menu function for setting an AP_Var.
|
@ -2,9 +2,12 @@
|
||||
// Unit tests for the AP_Meta_class and AP_Var classes.
|
||||
//
|
||||
|
||||
#define USE_AP_VAR
|
||||
#include <FastSerial.h>
|
||||
#include <AP_Common.h>
|
||||
#include <AP_Test.h>
|
||||
#include <AP_Var.h>
|
||||
#include <AP_Math.h>
|
||||
#include <string.h>
|
||||
|
||||
// we need to do this, even though normally it's a bad idea
|
1
libraries/AP_Var/examples/AP_Var/Makefile
Normal file
1
libraries/AP_Var/examples/AP_Var/Makefile
Normal file
@ -0,0 +1 @@
|
||||
include ../../../AP_Common/Arduino.mk
|
Loading…
Reference in New Issue
Block a user