From 47be4b5868dbf37412f8cef3f0c5b3da7f9c2792 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 3 Mar 2016 18:35:38 -0300 Subject: [PATCH] AP_OpticalFlow: fix use of undefined variable ../../libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp:86:5: warning: "FLOWONBOARD_DEBUG" is not defined [-Wundef] #if FLOWONBOARD_DEBUG ^ --- libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp index 07512ecde3..1cf96d79c7 100644 --- a/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp +++ b/libraries/AP_OpticalFlow/AP_OpticalFlow_Onboard.cpp @@ -22,7 +22,11 @@ (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP ||\ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_MINLURE ||\ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI) -//#define FLOWONBOARD_DEBUG 1 + +#ifndef OPTICALFLOW_ONBOARD_DEBUG +#define OPTICALFLOW_ONBOARD_DEBUG 0 +#endif + #define OPTICALFLOW_ONBOARD_ID 1 extern const AP_HAL::HAL& hal; @@ -83,7 +87,7 @@ void AP_OpticalFlow_Onboard::update() // copy results to front end _update_frontend(state); -#if FLOWONBOARD_DEBUG +#if OPTICALFLOW_ONBOARD_DEBUG hal.console->printf("FLOW_ONBOARD qual:%u FlowRateX:%4.2f Y:%4.2f" "BodyRateX:%4.2f Y:%4.2f, delta_time = %u\n", (unsigned)state.surface_quality,