From 6fda1e3f14c516ccf3eab0d72af816fa4b9f8587 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Sat, 17 Sep 2011 22:09:18 +0900 Subject: [PATCH] ArduCopter - small changes to fix compile errors when optical flow enabled --- ArduCopter/ArduCopter.pde | 2 +- ArduCopter/Log.pde | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index e6d3defd2c..e715de63f7 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -200,7 +200,7 @@ static AP_Int8 *flight_modes = &g.flight_mode1; AP_DCM dcm(&imu, g_gps); #ifdef OPTFLOW_ENABLED - AP_OpticalFlow_ADNS3080 optflow(); + AP_OpticalFlow_ADNS3080 optflow; #endif #endif diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 232f60e9dd..98dbf41998 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -503,8 +503,8 @@ static void Log_Write_Optflow() DataFlash.WriteInt((int)optflow.dx); DataFlash.WriteInt((int)optflow.dy); DataFlash.WriteInt((int)optflow.surface_quality); - DataFlash.WriteLong(optflow.lat);//optflow_offset.lat + optflow.lat); - DataFlash.WriteLong(optflow.lon);//optflow_offset.lng + optflow.lng); + DataFlash.WriteLong(optflow.vlat);//optflow_offset.lat + optflow.lat); + DataFlash.WriteLong(optflow.vlon);//optflow_offset.lng + optflow.lng); DataFlash.WriteByte(END_BYTE); } #endif