Changed RLT Yaw Mode for TradHeli. Also a few comment cleanups.

This commit is contained in:
Robert Lefebvre 2012-10-18 16:39:05 -04:00
parent 1c08e48b4b
commit 592f4040fd
4 changed files with 8 additions and 22 deletions

View File

@ -1666,8 +1666,7 @@ void update_roll_pitch_mode(void)
control_roll = g.rc_1.control_in;
control_pitch = g.rc_2.control_in;
// in this mode, nav_roll and nav_pitch = the iterm
get_stabilize_roll(control_roll);
get_stabilize_pitch(control_pitch);
@ -2043,7 +2042,6 @@ static void update_navigation()
if(yaw_mode == YAW_LOOK_AT_HOME) {
if(home_is_set) {
//nav_yaw = point_at_home_yaw();
nav_yaw = get_bearing_cd(&current_loc, &home);
} else {
nav_yaw = 0;
@ -2058,7 +2056,7 @@ static void update_nav_RTL()
// if loiter_timer value > 0, we are set to trigger auto_land or approach
set_mode(LOITER);
// just un case we arrive and we aren't at the lower RTL alt yet.
// just in case we arrive and we aren't at the lower RTL alt yet.
set_new_altitude(get_RTL_alt());
// force loitering above home

View File

@ -546,7 +546,11 @@
// AUTO Mode
#ifndef AUTO_YAW
# define AUTO_YAW YAW_AUTO
#if FRAME_CONFIG == HELI_FRAME
# define AUTO_YAW YAW_LOOK_AT_HOME
#else
# define AUTO_YAW YAW_AUTO
#endif
#endif
#ifndef AUTO_RP

View File

@ -16,7 +16,7 @@
#define YAW_HOLD 0
#define YAW_ACRO 1
#define YAW_AUTO 2
#define YAW_LOOK_AT_HOME 3
#define YAW_LOOK_AT_HOME 3
#define YAW_TOY 4 // THOR This is the Yaw mode

View File

@ -392,22 +392,6 @@ static void startup_ground(void)
reset_I_all();
}
/*
* #define YAW_HOLD 0
* #define YAW_ACRO 1
* #define YAW_AUTO 2
* #define YAW_LOOK_AT_HOME 3
*
* #define ROLL_PITCH_STABLE 0
* #define ROLL_PITCH_ACRO 1
* #define ROLL_PITCH_AUTO 2
*
* #define THROTTLE_MANUAL 0
* #define THROTTLE_HOLD 1
* #define THROTTLE_AUTO 2
*
*/
static void set_mode(byte mode)
{
// if we don't have GPS lock