From 84c5a392da1034a818f892cf0416501edb52c384 Mon Sep 17 00:00:00 2001 From: Jean-Louis Naudin Date: Sun, 20 May 2012 17:45:07 +0200 Subject: [PATCH] APMrover v2.1.6a - small update for LITE version Signed-off-by: Jean-Louis Naudin --- APMrover2/APM_Config.h | 4 ++-- APMrover2/APMrover2.pde | 4 ++-- APMrover2/navigation.pde | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/APMrover2/APM_Config.h b/APMrover2/APM_Config.h index 591ff750cc..965e7df391 100644 --- a/APMrover2/APM_Config.h +++ b/APMrover2/APM_Config.h @@ -20,8 +20,8 @@ #define TRACE DISABLED -#include "APM_Config_HILmode.h" // for test in HIL mode with AeroSIM Rc 3.83 -//#include "APM_Config_Rover.h" // to be used with the real Traxxas model Monster Jam Grinder +//#include "APM_Config_HILmode.h" // for test in HIL mode with AeroSIM Rc 3.83 +#include "APM_Config_Rover.h" // to be used with the real Traxxas model Monster Jam Grinder // Radio setup: // APM INPUT (Rec = receiver) diff --git a/APMrover2/APMrover2.pde b/APMrover2/APMrover2.pde index 49417b0359..d98c1373f7 100644 --- a/APMrover2/APMrover2.pde +++ b/APMrover2/APMrover2.pde @@ -1,6 +1,6 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- -#define THISFIRMWARE "APMrover v2.16 JL NAUDIN" //New version of the APMrover for the APM v1 or APM v2 and magnetometer + SONAR +#define THISFIRMWARE "APMrover v2.16a JL NAUDIN" //New version of the APMrover for the APM v1 or APM v2 and magnetometer + SONAR // This is a full version of Arduplane v2.32 specially adapted for a Rover by Jean-Louis Naudin (JLN) @@ -18,7 +18,7 @@ License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. // -// JLN updates: last update 2012-05-17 +// JLN updates: last update 2012-05-20 // // DOLIST: // diff --git a/APMrover2/navigation.pde b/APMrover2/navigation.pde index 453049852b..edf31885f8 100644 --- a/APMrover2/navigation.pde +++ b/APMrover2/navigation.pde @@ -76,12 +76,14 @@ static void calc_gndspeed_undershoot() } static void calc_bearing_error() -{ +{ +#if LITE == DISABLED #if CONFIG_SONAR == ENABLED if((g.sonar_enabled) && (sonar_dist < g.sonar_trigger)) { nav_bearing += 9000; // if obstacle in front turn 90° right } #endif +#endif bearing_error = nav_bearing - ground_course; bearing_error = wrap_180(bearing_error); }