added a bit of kI term for Yaw hold.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1918 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
69b0ae329e
commit
16412abbde
@ -276,7 +276,9 @@ void output_manual_yaw()
|
|||||||
clear_yaw_control();
|
clear_yaw_control();
|
||||||
did_clear_yaw_control = true;
|
did_clear_yaw_control = true;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
|
}else{ // motors running
|
||||||
|
|
||||||
// Yaw control
|
// Yaw control
|
||||||
if(g.rc_4.control_in == 0){
|
if(g.rc_4.control_in == 0){
|
||||||
output_yaw_with_hold(true); // hold yaw
|
output_yaw_with_hold(true); // hold yaw
|
||||||
|
@ -20,9 +20,6 @@ static int8_t select_logs(uint8_t argc, const Menu::arg *argv);
|
|||||||
// printf_P is a version of print_f that reads from flash memory
|
// printf_P is a version of print_f that reads from flash memory
|
||||||
static int8_t help_log(uint8_t argc, const Menu::arg *argv)
|
static int8_t help_log(uint8_t argc, const Menu::arg *argv)
|
||||||
{
|
{
|
||||||
// log hack
|
|
||||||
//Serial.begin(115200, 128, 128);
|
|
||||||
|
|
||||||
Serial.printf_P(PSTR("\n"
|
Serial.printf_P(PSTR("\n"
|
||||||
"Commands:\n"
|
"Commands:\n"
|
||||||
" dump <n>"
|
" dump <n>"
|
||||||
@ -527,7 +524,10 @@ void Log_Write_Control_Tuning()
|
|||||||
DataFlash.WriteInt((int)(g.rc_3.servo_out));
|
DataFlash.WriteInt((int)(g.rc_3.servo_out));
|
||||||
DataFlash.WriteInt((int)(g.rc_4.control_in));
|
DataFlash.WriteInt((int)(g.rc_4.control_in));
|
||||||
DataFlash.WriteInt((int)(g.rc_4.servo_out));
|
DataFlash.WriteInt((int)(g.rc_4.servo_out));
|
||||||
|
|
||||||
|
// yaw
|
||||||
DataFlash.WriteInt((int)yaw_error);
|
DataFlash.WriteInt((int)yaw_error);
|
||||||
|
DataFlash.WriteInt((int)(dcm.yaw_sensor/100));
|
||||||
|
|
||||||
// Yaw mode
|
// Yaw mode
|
||||||
DataFlash.WriteByte(yaw_debug);
|
DataFlash.WriteByte(yaw_debug);
|
||||||
@ -553,13 +553,15 @@ void Log_Write_Control_Tuning()
|
|||||||
// Read an control tuning packet
|
// Read an control tuning packet
|
||||||
void Log_Read_Control_Tuning()
|
void Log_Read_Control_Tuning()
|
||||||
{
|
{
|
||||||
Serial.printf_P(PSTR("CTUN, %d, %d, %d, %d, %d, %d, %1.4f, %1.4f, %1.4f, %d, %d, %d\n"),
|
Serial.printf_P(PSTR("CTUN, %d, %d, %d, %d, %d, %d, %d, %1.4f, %1.4f, %1.4f, %d, %d, %d\n"),
|
||||||
// Control
|
// Control
|
||||||
DataFlash.ReadInt(),
|
DataFlash.ReadInt(),
|
||||||
DataFlash.ReadInt(),
|
DataFlash.ReadInt(),
|
||||||
DataFlash.ReadInt(),
|
DataFlash.ReadInt(),
|
||||||
DataFlash.ReadInt(),
|
DataFlash.ReadInt(),
|
||||||
|
|
||||||
|
// yaw
|
||||||
|
DataFlash.ReadInt(),
|
||||||
DataFlash.ReadInt(),
|
DataFlash.ReadInt(),
|
||||||
|
|
||||||
// Yaw Mode
|
// Yaw Mode
|
||||||
|
@ -346,7 +346,7 @@
|
|||||||
# define YAW_P 0.4 // increase for more aggressive Yaw Hold, decrease if it's bouncy
|
# define YAW_P 0.4 // increase for more aggressive Yaw Hold, decrease if it's bouncy
|
||||||
#endif
|
#endif
|
||||||
#ifndef YAW_I
|
#ifndef YAW_I
|
||||||
# define YAW_I 0.0 // Always 0
|
# define YAW_I 0.1 // increased to .1 to try and get over user's steady state error caused by poor balance
|
||||||
#endif
|
#endif
|
||||||
#ifndef YAW_D
|
#ifndef YAW_D
|
||||||
# define YAW_D 0.13 // Trying a lower value to prevent odd behavior
|
# define YAW_D 0.13 // Trying a lower value to prevent odd behavior
|
||||||
|
Loading…
Reference in New Issue
Block a user