-
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
Replace PASSTHROUGH with MANUAL flight mode (FW) #2661
Merged
digitalentity
merged 20 commits into
iNavFlight:development
from
shellixyz:development_manual_flight_mode_separate_pitchroll_expo
Jan 31, 2018
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
14502e0
FW: add manual flight mode
shellixyz a955bf5
manual mode: separate roll and pitch expo
shellixyz 0aa0a75
manual flight mode: cleaning
shellixyz 4e6a95b
Merge branch 'development' into development_manual_flight_mode_separa…
shellixyz a52bf62
replace PASSTHRU mode with MANUAL mode
shellixyz 7ad5728
manual mode: merge pitch and roll expo
shellixyz e00ee80
manual mode: add OSD menu for manual rates and expo
shellixyz 5d8259d
manual mode: forgot to add yaw rate adjustment in OSD menu
shellixyz c82b065
manual mode: add adjustments
shellixyz 71c1530
fix indentation
shellixyz 3936a95
Merge branch 'development_manual_flight_mode_separate_pitchroll_expo'…
shellixyz bba8620
fix indentation
shellixyz 9c28150
manual mode: move rates applications in fc_core
shellixyz fc72312
group controlRateConfig settings by function
shellixyz afcf673
group controlRateConfig settings by function: fix ALIENFLIGHTF3 defau…
shellixyz af4430c
Merge branch 'development_manual_flight_mode_separate_pitchroll_expo'…
shellixyz 7273418
manual mode rc adjustments: adapt to fc723121 changes
shellixyz 8282e96
fix indentation
shellixyz 2d01012
manual mode: clean rc adjustments
shellixyz d01af8f
add new MSPv2 messages: MSP2_INAV_RATE_PROFILE and MSP2_INAV_SET_RATE…
shellixyz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,21 +33,34 @@ | |
const controlRateConfig_t *currentControlRateProfile; | ||
|
||
|
||
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, MAX_CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 0); | ||
PG_REGISTER_ARRAY_WITH_RESET_FN(controlRateConfig_t, MAX_CONTROL_RATE_PROFILE_COUNT, controlRateProfiles, PG_CONTROL_RATE_PROFILES, 1); | ||
|
||
void pgResetFn_controlRateProfiles(controlRateConfig_t *instance) | ||
{ | ||
for (int i = 0; i < MAX_CONTROL_RATE_PROFILE_COUNT; i++) { | ||
RESET_CONFIG(controlRateConfig_t, &instance[i], | ||
.rcExpo8 = 70, | ||
.thrMid8 = 50, | ||
.thrExpo8 = 0, | ||
.dynThrPID = 0, | ||
.rcYawExpo8 = 20, | ||
.tpa_breakpoint = 1500, | ||
.rates[FD_ROLL] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT, | ||
.rates[FD_PITCH] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT, | ||
.rates[FD_YAW] = CONTROL_RATE_CONFIG_YAW_RATE_DEFAULT | ||
.throttle = { | ||
.rcMid8 = 50, | ||
.rcExpo8 = 0, | ||
.dynPID = 0, | ||
.pa_breakpoint = 1500 | ||
}, | ||
|
||
.stabilized = { | ||
.rcExpo8 = 70, | ||
.rcYawExpo8 = 20, | ||
.rates[FD_ROLL] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT, | ||
.rates[FD_PITCH] = CONTROL_RATE_CONFIG_ROLL_PITCH_RATE_DEFAULT, | ||
.rates[FD_YAW] = CONTROL_RATE_CONFIG_YAW_RATE_DEFAULT, | ||
}, | ||
|
||
.manual = { | ||
.rcExpo8 = 70, | ||
.rcYawExpo8 = 20, | ||
.rates[FD_ROLL] = 100, | ||
.rates[FD_PITCH] = 100, | ||
.rates[FD_YAW] = 100 | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yay! This is even cleaner than I thought it would be 👍 |
||
); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Suggest we keep manual expos at zero by default to retain 100% compatibility with old PASSTHROUGH behavior. What do you think?
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.
Expo is applied even in PASSTHROUGH that's why I set the default expo/yaw_expo to 70/20 to keep the old behavior but I don't mind setting them to 0 by default.
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.
About the MSPv2 frame there is already MSP2_COMMON_SETTING and MSP2_COMMON_SET_SETTING frame types that can be used to query/set the new settings. Do we need a new one ?
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.
@shellixyz Regarding expo - I see. Didn't realize that. Then it's ok.
Regarding MSPv2 - it would still be good to set this settings in a single message. Possibly a new message to handle the whole rate profile data.
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.
Done. New frame IDs are 0x2007 (MSP2_INAV_RATE_PROFILE) and 0x2008 (MSP2_INAV_SET_RATE_PROFILE) because I already used lower IDs for new messages in #2668.