Browse Source

Copter: increase get_roi_yaw from 40hz to 100hz

mission-4.1.18
Jonathan Challinger 10 years ago committed by Randy Mackay
parent
commit
f77b359e83
  1. 4
      ArduCopter/Attitude.pde

4
ArduCopter/Attitude.pde

@ -58,10 +58,10 @@ static float get_pilot_desired_yaw_rate(int16_t stick_angle) @@ -58,10 +58,10 @@ static float get_pilot_desired_yaw_rate(int16_t stick_angle)
// should be called at 100hz
static float get_roi_yaw()
{
static uint8_t roi_yaw_counter = 0; // used to reduce update rate to 10hz
static uint8_t roi_yaw_counter = 0; // used to reduce update rate to 100hz
roi_yaw_counter++;
if (roi_yaw_counter >= 10) {
if (roi_yaw_counter >= 4) {
roi_yaw_counter = 0;
yaw_look_at_WP_bearing = pv_get_bearing_cd(inertial_nav.get_position(), roi_WP);
}

Loading…
Cancel
Save