Skip to content

Commit

Permalink
Copter: remove decimator from get_roi_yaw
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall committed Feb 3, 2015
1 parent 0c4e6c9 commit dd465c5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ArduCopter/Attitude.pde
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ 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

roi_yaw_counter++;
if (roi_yaw_counter >= 10) {
roi_yaw_counter = 0;
yaw_look_at_WP_bearing = pv_get_bearing_cd(inertial_nav.get_position(), roi_WP);
}
yaw_look_at_WP_bearing = pv_get_bearing_cd(inertial_nav.get_position(), roi_WP);

return yaw_look_at_WP_bearing;
}
Expand Down

0 comments on commit dd465c5

Please sign in to comment.