Skip to content

Commit

Permalink
Make NAV_CRUISE roll adjustments smoother
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed Jun 16, 2018
1 parent c9afc2e commit fe06cb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/navigation/navigation_fixedwing.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ void applyFixedWingNavigationController(navigationFSMStateFlags_t navStateFlags,
applyFixedWingPositionController(currentTimeUs);
#endif

if (FLIGHT_MODE(NAV_CRUISE_MODE) && posControl.flags.isAdjustingPosition)
rcCommand[ROLL] = applyDeadband(rcCommand[ROLL], rcControlsConfig()->pos_hold_deadband);

//if (navStateFlags & NAV_CTL_YAW)
if ((navStateFlags & NAV_CTL_ALT) || (navStateFlags & NAV_CTL_POS))
applyFixedWingPitchRollThrottleController(navStateFlags, currentTimeUs);
Expand Down

0 comments on commit fe06cb2

Please sign in to comment.