From a7bc3d2cc641da76d695a7361754c9b7a41845e1 Mon Sep 17 00:00:00 2001 From: Adam M Rivera Date: Wed, 18 Apr 2012 23:07:35 -0500 Subject: [PATCH] Arducopter.pde: Moved gps to 10hz. Changed calc_XY_velocity to calc_GPS_velocity. --- ArduCopter/ArduCopter.pde | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index e477fdedef..7bf4636d1d 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -922,9 +922,9 @@ void loop() // check for new GPS messages // -------------------------- - if(GPS_enabled){ - update_GPS(); - } + //if(GPS_enabled){ + // update_GPS(); + //} // perform 10hz tasks // ------------------ @@ -996,9 +996,9 @@ static void medium_loop() case 0: medium_loopCounter++; - //if(GPS_enabled){ - // update_GPS(); - //} + if(GPS_enabled){ + update_GPS(); + } #if HIL_MODE != HIL_MODE_ATTITUDE // don't execute in HIL mode if(g.compass_enabled){ @@ -1036,7 +1036,8 @@ static void medium_loop() // this calculates the velocity for Loiter // only called when there is new data // ---------------------------------- - calc_XY_velocity(); + //calc_XY_velocity(); + calc_GPS_velocity(); // If we have optFlow enabled we can grab a more accurate speed // here and override the speed from the GPS