Skip to content

Commit

Permalink
Adjust yaw controls for smoother manual operation around stick deadba…
Browse files Browse the repository at this point in the history
…nd area.
  • Loading branch information
mpaperno committed Nov 13, 2016
1 parent d0afc4a commit f8ef7fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void controlTaskCode(void *unused) {
if (controlData.controllerType != CONTROLLER_TYPE_QUATOS)
pidZeroIntegral(controlData.rateModePID[axis], 0.0f, 0.0f);

utilFilterReset3(controlData.rateFilter[axis], (controlData.ratesDesired[axis] + ratesActual[axis]) * 0.5f); //ratesActual[axis]
utilFilterReset3(controlData.rateFilter[axis], 0.0f); // controlData.ratesDesired[axis] // ratesActual[axis]
}

// smooth
Expand Down Expand Up @@ -291,7 +291,8 @@ void controlTaskCode(void *unused) {
// still overriding
else {
--overrides[axis];
controlData.ratesDesired[axis] = 0.0f;
controlData.ratesDesired[axis] = utilFilter3(controlData.rateFilter[axis], 0.0f);

// keep up with actual craft heading
if (axis == RPY_Y)
controlData.anglesDesired[RPY_Y] = navData.holdHeading = AQ_YAW;
Expand Down

0 comments on commit f8ef7fb

Please sign in to comment.