From 7b8767d84647d1d88417cc238d1e667c4580ca74 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Mon, 9 Jan 2012 16:57:57 -0800 Subject: [PATCH] Added comments --- ArduCopter/Attitude.pde | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ArduCopter/Attitude.pde b/ArduCopter/Attitude.pde index 8c075f3305..d5c574c77b 100644 --- a/ArduCopter/Attitude.pde +++ b/ArduCopter/Attitude.pde @@ -237,14 +237,28 @@ static void reset_hold_I(void) // Keeps old data out of our calculation / logs static void reset_nav(void) { + // forces us to update nav throttle invalid_throttle = true; nav_throttle = 0; + + // always start Circle mode at same angle circle_angle = 0; + + // We must be heading to a new WP, so XTrack must be 0 crosstrack_error = 0; + + // Will be set by new command target_bearing = 0; + + // Will be set by new command wp_distance = 0; + + // Will be set by new command, used by loiter long_error = 0; lat_error = 0; + + // Will be set by new command, used by loiter + next_WP.alt = 0; } static void reset_rate_I()