From fe475a35616846917dccc338569a3e6aa2fe97a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Jul 2014 10:43:17 +1000 Subject: [PATCH] AP_RangeFinder: removed old PulsedLightLRF example --- .../examples/PulsedLightLRF_test/Makefile | 2 - .../PulsedLightLRF_test.pde | 66 ------------------- .../PulsedLightLRF_test/nocore.inoflag | 0 3 files changed, 68 deletions(-) delete mode 100644 libraries/AP_RangeFinder/examples/PulsedLightLRF_test/Makefile delete mode 100644 libraries/AP_RangeFinder/examples/PulsedLightLRF_test/PulsedLightLRF_test.pde delete mode 100644 libraries/AP_RangeFinder/examples/PulsedLightLRF_test/nocore.inoflag diff --git a/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/Makefile b/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/Makefile deleted file mode 100644 index 87e4482ca3..0000000000 --- a/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -BOARD = mega -include ../../../../mk/apm.mk diff --git a/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/PulsedLightLRF_test.pde b/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/PulsedLightLRF_test.pde deleted file mode 100644 index a3579c3840..0000000000 --- a/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/PulsedLightLRF_test.pde +++ /dev/null @@ -1,66 +0,0 @@ -/* - * AP_RangeFinder_test - * Code by DIYDrones.com - */ - -// includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//////////////////////////////////////////////////////////////////////////////// -// hal.console-> ports -//////////////////////////////////////////////////////////////////////////////// -const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER; - -// declare global instances -ModeFilterInt16_Size5 mode_filter(2); -AP_RangeFinder_PulsedLightLRF lrf(&mode_filter); - -void setup() -{ - // print welcome message - hal.console->println("PulsedLight LRF Test v1.1"); - - // ensure i2c is slow - hal.i2c->setHighSpeed(false); - - // initialise sensor - lrf.init(); - - // kick off one reading - lrf.take_reading(); - - // check health - if (!lrf.healthy) { - hal.console->println("Initialisation failed"); - } -} - -void loop() -{ - int16_t distance; - - // ask sensor take a reading - //lrf.take_reading(); - hal.scheduler->delay(50); - - // get distance - distance = lrf.read(); - - // display output - //hal.console->printf_P(PSTR("dist: %d \thealth:%d \tb0:%d b1:%d\n"),(int)distance,(int)lrf.healthy,(int)lrf._buff[0], (int)lrf._buff[1]); - //hal.console->printf_P(PSTR("dist: %d\n"),(int)distance); - hal.console->printf_P(PSTR("dist: %d %d\n"),(int)distance,(int)lrf.healthy); -} - -AP_HAL_MAIN(); diff --git a/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/nocore.inoflag b/libraries/AP_RangeFinder/examples/PulsedLightLRF_test/nocore.inoflag deleted file mode 100644 index e69de29bb2..0000000000