-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CRUISE MODE for Fixed Wing #3311
Implement CRUISE MODE for Fixed Wing #3311
Conversation
19b2b29
to
970c308
Compare
src/main/fc/fc_msp_box.c
Outdated
@@ -188,6 +189,7 @@ void initActiveBoxIds(void) | |||
activeBoxIds[activeBoxIdCount++] = BOXNAVWP; | |||
activeBoxIds[activeBoxIdCount++] = BOXHOMERESET; | |||
activeBoxIds[activeBoxIdCount++] = BOXGCSNAV; | |||
if(STATE(FIXED_WING)) {activeBoxIds[activeBoxIdCount++] = BOXNAVCRUISE;} //Temp fix before CRUISE will be active for MC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, move the if body into its own line.
@@ -340,7 +344,7 @@ void applyFixedWingPositionController(timeUs_t currentTimeUs) | |||
// Calculate virtual position target at a distance of forwardVelocity * HZ2S(POSITION_TARGET_UPDATE_RATE_HZ) | |||
// Account for pilot's roll input (move position target left/right at max of max_manual_speed) | |||
// POSITION_TARGET_UPDATE_RATE_HZ should be chosen keeping in mind that position target shouldn't be reached until next pos update occurs | |||
// FIXME: verify the above | |||
// FIXME: verify the above- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the extra -
? Seems it's the only change in this line.
9517fb1
to
963fcb7
Compare
21ce792
to
b92e208
Compare
@giacomo892 @shellixyz rebase is required |
d941f50
to
4771028
Compare
4771028
to
fe06cb2
Compare
Rebased and squashed. I tested this extensively it is ready to merge IMO. |
Squashed again and merged. Thanks! |
Implementing
CRUISE MODE
(2D and 3D) for Fixed Wing aircrafts.2D Mode: The aircraft will maintain the current heading unless pilot changes it via yaw input or roll the aircraft.
3D Mode: The aircraft will maintain the current altitude (change via pitch command) and the current heading unless pilot changes it via yaw input or roll the aircraft.
It can be enabled together with launch mode so the aircraft will enter in
CRUISE MODE
right after the launch is over.Thanks to @shellixyz for the contribution to the code and the massive amount of time spent in testing and fix issues with the implementation.
As today the code it is being flown and works but indeed code need a review.