moved mode logging to end of function for better throttlehold recording

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2435 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
jasonshort 2011-05-29 20:27:14 +00:00
parent f747e39062
commit dcbf161c41
1 changed files with 2 additions and 2 deletions

View File

@ -315,8 +315,6 @@ void set_mode(byte mode)
control_mode = mode; control_mode = mode;
control_mode = constrain(control_mode, 0, NUM_MODES - 1); control_mode = constrain(control_mode, 0, NUM_MODES - 1);
Log_Write_Mode(control_mode);
// used to stop fly_aways // used to stop fly_aways
if(g.rc_3.control_in == 0){ // throttle is 0 if(g.rc_3.control_in == 0){ // throttle is 0
// we are on the ground is this is true // we are on the ground is this is true
@ -364,6 +362,8 @@ void set_mode(byte mode)
break; break;
} }
Log_Write_Mode(control_mode);
// output control mode to the ground station // output control mode to the ground station
gcs.send_message(MSG_MODE_CHANGE); gcs.send_message(MSG_MODE_CHANGE);
} }