Browse Source

Sub: Clarify that the target_yaw_rate variable is set

apm_2208
murata 3 years ago committed by Randy Mackay
parent
commit
047b2d5578
  1. 3
      ArduSub/control_stabilize.cpp
  2. 3
      ArduSub/control_surface.cpp

3
ArduSub/control_stabilize.cpp

@ -16,7 +16,6 @@ void Sub::stabilize_run() @@ -16,7 +16,6 @@ void Sub::stabilize_run()
{
uint32_t tnow = AP_HAL::millis();
float target_roll, target_pitch;
float target_yaw_rate;
// if not armed set throttle to zero and exit immediately
if (!motors.armed()) {
@ -34,7 +33,7 @@ void Sub::stabilize_run() @@ -34,7 +33,7 @@ void Sub::stabilize_run()
get_pilot_desired_lean_angles(channel_roll->get_control_in(), channel_pitch->get_control_in(), target_roll, target_pitch, aparm.angle_max);
// get pilot's desired yaw rate
target_yaw_rate = get_pilot_desired_yaw_rate(channel_yaw->get_control_in());
float target_yaw_rate = get_pilot_desired_yaw_rate(channel_yaw->get_control_in());
// call attitude controller
// update attitude controller targets

3
ArduSub/control_surface.cpp

@ -21,7 +21,6 @@ bool Sub::surface_init() @@ -21,7 +21,6 @@ bool Sub::surface_init()
void Sub::surface_run()
{
float target_roll, target_pitch;
float target_yaw_rate;
// if not armed set throttle to zero and exit immediately
if (!motors.armed()) {
@ -43,7 +42,7 @@ void Sub::surface_run() @@ -43,7 +42,7 @@ void Sub::surface_run()
get_pilot_desired_lean_angles(channel_roll->get_control_in(), channel_pitch->get_control_in(), target_roll, target_pitch, aparm.angle_max);
// get pilot's desired yaw rate
target_yaw_rate = get_pilot_desired_yaw_rate(channel_yaw->get_control_in());
float target_yaw_rate = get_pilot_desired_yaw_rate(channel_yaw->get_control_in());
// call attitude controller
attitude_control.input_euler_angle_roll_pitch_euler_rate_yaw(target_roll, target_pitch, target_yaw_rate);

Loading…
Cancel
Save