ACM: Formatting

This commit is contained in:
Jason Short 2012-10-27 14:13:46 -07:00
parent 5149a8c723
commit 1713279ace
1 changed files with 16 additions and 16 deletions

View File

@ -441,25 +441,25 @@ static void set_mode(byte mode)
switch(control_mode) switch(control_mode)
{ {
case ACRO: case ACRO:
yaw_mode = YAW_ACRO; yaw_mode = YAW_ACRO;
roll_pitch_mode = ROLL_PITCH_ACRO; roll_pitch_mode = ROLL_PITCH_ACRO;
throttle_mode = THROTTLE_MANUAL; throttle_mode = THROTTLE_MANUAL;
// reset acro axis targets to current attitude // reset acro axis targets to current attitude
if( g.axis_enabled ) { if( g.axis_enabled ) {
roll_axis = ahrs.roll_sensor; roll_axis = ahrs.roll_sensor;
pitch_axis = ahrs.pitch_sensor; pitch_axis = ahrs.pitch_sensor;
nav_yaw = ahrs.yaw_sensor; nav_yaw = ahrs.yaw_sensor;
} }
break; break;
case STABILIZE: case STABILIZE:
yaw_mode = YAW_HOLD; yaw_mode = YAW_HOLD;
roll_pitch_mode = ROLL_PITCH_STABLE; roll_pitch_mode = ROLL_PITCH_STABLE;
throttle_mode = THROTTLE_MANUAL; throttle_mode = THROTTLE_MANUAL;
break; break;
case ALT_HOLD: case ALT_HOLD:
yaw_mode = ALT_HOLD_YAW; yaw_mode = ALT_HOLD_YAW;
roll_pitch_mode = ALT_HOLD_RP; roll_pitch_mode = ALT_HOLD_RP;
throttle_mode = ALT_HOLD_THR; throttle_mode = ALT_HOLD_THR;
@ -467,7 +467,7 @@ static void set_mode(byte mode)
break; break;
case AUTO: case AUTO:
yaw_mode = AUTO_YAW; yaw_mode = AUTO_YAW;
roll_pitch_mode = AUTO_RP; roll_pitch_mode = AUTO_RP;
throttle_mode = AUTO_THR; throttle_mode = AUTO_THR;
@ -476,45 +476,45 @@ static void set_mode(byte mode)
break; break;
case CIRCLE: case CIRCLE:
yaw_mode = CIRCLE_YAW; yaw_mode = CIRCLE_YAW;
roll_pitch_mode = CIRCLE_RP; roll_pitch_mode = CIRCLE_RP;
throttle_mode = CIRCLE_THR; throttle_mode = CIRCLE_THR;
set_next_WP(&current_loc); set_next_WP(&current_loc);
circle_WP = next_WP; circle_WP = next_WP;
circle_angle = 0; circle_angle = 0;
break; break;
case LOITER: case LOITER:
yaw_mode = LOITER_YAW; yaw_mode = LOITER_YAW;
roll_pitch_mode = LOITER_RP; roll_pitch_mode = LOITER_RP;
throttle_mode = LOITER_THR; throttle_mode = LOITER_THR;
set_next_WP(&current_loc); set_next_WP(&current_loc);
break; break;
case POSITION: case POSITION:
yaw_mode = YAW_HOLD; yaw_mode = YAW_HOLD;
roll_pitch_mode = ROLL_PITCH_AUTO; roll_pitch_mode = ROLL_PITCH_AUTO;
throttle_mode = THROTTLE_MANUAL; throttle_mode = THROTTLE_MANUAL;
set_next_WP(&current_loc); set_next_WP(&current_loc);
break; break;
case GUIDED: case GUIDED:
yaw_mode = YAW_AUTO; yaw_mode = YAW_AUTO;
roll_pitch_mode = ROLL_PITCH_AUTO; roll_pitch_mode = ROLL_PITCH_AUTO;
throttle_mode = THROTTLE_AUTO; throttle_mode = THROTTLE_AUTO;
next_WP = current_loc; next_WP = current_loc;
set_next_WP(&guided_WP); set_next_WP(&guided_WP);
break; break;
case LAND: case LAND:
yaw_mode = LOITER_YAW; yaw_mode = LOITER_YAW;
roll_pitch_mode = LOITER_RP; roll_pitch_mode = LOITER_RP;
throttle_mode = THROTTLE_AUTO; throttle_mode = THROTTLE_AUTO;
do_land(); do_land();
break; break;
case RTL: case RTL:
yaw_mode = RTL_YAW; yaw_mode = RTL_YAW;
roll_pitch_mode = RTL_RP; roll_pitch_mode = RTL_RP;
throttle_mode = RTL_THR; throttle_mode = RTL_THR;
rtl_reached_alt = false; rtl_reached_alt = false;
@ -523,7 +523,7 @@ static void set_mode(byte mode)
break; break;
case OF_LOITER: case OF_LOITER:
yaw_mode = OF_LOITER_YAW; yaw_mode = OF_LOITER_YAW;
roll_pitch_mode = OF_LOITER_RP; roll_pitch_mode = OF_LOITER_RP;
throttle_mode = OF_LOITER_THR; throttle_mode = OF_LOITER_THR;
set_next_WP(&current_loc); set_next_WP(&current_loc);