From 0601f7e8ceaa3ae0e153ceb04e1478bba447a18a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 13 Nov 2011 20:10:41 +1100 Subject: [PATCH] barometer: support 'make purple' for barometer example code --- .../APM_BMP085/examples/APM_BMP085_test/APM_BMP085_test.pde | 5 ++++- libraries/APM_BMP085/examples/APM_BMP085_test/Makefile | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/APM_BMP085/examples/APM_BMP085_test/APM_BMP085_test.pde b/libraries/APM_BMP085/examples/APM_BMP085_test/APM_BMP085_test.pde index 168aa6ae31..66f107e9be 100644 --- a/libraries/APM_BMP085/examples/APM_BMP085_test/APM_BMP085_test.pde +++ b/libraries/APM_BMP085/examples/APM_BMP085_test/APM_BMP085_test.pde @@ -13,8 +13,11 @@ unsigned long timer; FastSerialPort0(Serial); -// set this to true on purple +#ifdef PURPLE_HARDWARE +static bool purple_hardware = true; +#else static bool purple_hardware = false; +#endif void setup() { diff --git a/libraries/APM_BMP085/examples/APM_BMP085_test/Makefile b/libraries/APM_BMP085/examples/APM_BMP085_test/Makefile index 85b4d8856b..4e3c0e42ba 100644 --- a/libraries/APM_BMP085/examples/APM_BMP085_test/Makefile +++ b/libraries/APM_BMP085/examples/APM_BMP085_test/Makefile @@ -1,2 +1,5 @@ BOARD = mega include ../../../AP_Common/Arduino.mk + +purple: + make -f Makefile EXTRAFLAGS="-DPURPLE_HARDWARE=1"