-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Update ConfigureArducopter and FlightPlanner to accomodate new param names and units/scales #3685
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
Open
EosBandi
wants to merge
11
commits into
ArduPilot:master
Choose a base branch
from
EosBandi:Copter4.7updates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
edb3d74
Add param change list with descriptions
EosBandi 168be12
Update parameters in ExtendedCopter Config, also add a warning based …
EosBandi 22d55ab
add changed WP_RADIUS_M to FlightPlanner
EosBandi a9280c5
ConfigAC_Fence : Support both RTL_ALT and RTL_ALT_M for RTL altitude
EosBandi 0db33ae
ConfigInitialParam: ATC_ACC_* and help text for PSC_D_*
EosBandi de9bad1
FlightPlanner: WP_ACC and WP_SPD for spline calc and bug in WP_RADIUS
EosBandi ef48dda
GridUI: WP_SPD
EosBandi 10c6285
FaceMap: WP_SPD
EosBandi 5b49c5e
DroneGroup: RTL_ALT_M and WP_ACC
EosBandi 488af63
Removed q_pilot params as per request from Randy, they were incorrect…
EosBandi e61b35e
Update case on PramaChange47 class name
EosBandi 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
|
|
||
| namespace MissionPlanner.Utilities | ||
| { | ||
| public class ParamChanges47 | ||
| { | ||
| // 4.7 parameter changes - keyed by new param name, value is "OLD → NEW: description" | ||
| private static readonly Dictionary<string, string> _byNewParam = new Dictionary<string, string> | ||
| { | ||
| // ARMING | ||
| { "ARMING_SKIPCHK", "ARMING_CHECK → ARMING_SKIPCHK: select which checks to disable" }, | ||
| // ATC (Copter) | ||
| { "ATC_ANGLE_MAX", "ANGLE_MAX → ATC_ANGLE_MAX: units changed from cd to deg" }, | ||
| { "ATC_ACC_R_MAX", "ATC_ACCEL_R_MAX → ATC_ACC_R_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "ATC_ACC_P_MAX", "ATC_ACCEL_P_MAX → ATC_ACC_P_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "ATC_ACC_Y_MAX", "ATC_ACCEL_Y_MAX → ATC_ACC_Y_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "ATC_RATE_WPY_MAX", "ATC_SLEW_YAW → ATC_RATE_WPY_MAX: units changed from cdeg/s to deg/s" }, | ||
| // CIRCLE (Copter) | ||
| { "CIRCLE_RADIUS_M", "CIRCLE_RADIUS → CIRCLE_RADIUS_M: units changed from cm to m" }, | ||
| // LAND (Copter) | ||
| { "LAND_SPD_MS", "LAND_SPEED → LAND_SPD_MS: units changed from cm/s to m/s" }, | ||
| { "LAND_SPD_HIGH_MS", "LAND_SPEED_HIGH → LAND_SPD_HIGH_MS: units changed from cm/s to m/s" }, | ||
| { "LAND_ALT_LOW_M", "LAND_ALT_LOW → LAND_ALT_LOW_M: units changed from cm to m" }, | ||
| // LOIT (Copter) | ||
| { "LOIT_SPEED_MS", "LOIT_SPEED → LOIT_SPEED_MS: units changed from cm/s to m/s" }, | ||
| { "LOIT_ACC_MAX_M", "LOIT_ACC_MAX → LOIT_ACC_MAX_M: units changed from cm/s/s to m/s/s" }, | ||
| { "LOIT_BRK_ACC_M", "LOIT_BRK_ACCEL → LOIT_BRK_ACC_M: units changed from cm/s/s to m/s/s" }, | ||
| { "LOIT_BRK_JRK_M", "LOIT_BRK_JERK → LOIT_BRK_JRK_M: units changed from cm/s/s/s to m/s/s/s" }, | ||
| // PILOT (Copter) | ||
| { "PILOT_ACC_Z", "PILOT_ACCEL_Z → PILOT_ACC_Z: units changed from cm/s/s to m/s/s" }, | ||
| { "PILOT_SPD_UP", "PILOT_SPEED_UP → PILOT_SPD_UP: units changed from cm/s to m/s" }, | ||
| { "PILOT_SPD_DN", "PILOT_SPEED_DN → PILOT_SPD_DN: units changed from cm/s to m/s" }, | ||
| { "PILOT_TKO_ALT_M", "PILOT_TKOFF_ALT → PILOT_TKO_ALT_M: units changed from cm to m" }, | ||
| // PHLD (Copter) | ||
| { "PHLD_BRK_ANGLE", "PHLD_BRAKE_ANGLE → PHLD_BRK_ANGLE: units changed from cd to deg" }, | ||
| { "PHLD_BRK_RATE", "PHLD_BRAKE_RATE → PHLD_BRK_RATE: no scaling change, name only" }, | ||
| // PSC_VELXY → PSC_NE_VEL (Copter) | ||
| { "PSC_NE_VEL_P", "PSC_VELXY_P → PSC_NE_VEL_P: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_I", "PSC_VELXY_I → PSC_NE_VEL_I: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_D", "PSC_VELXY_D → PSC_NE_VEL_D: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_IMAX", "PSC_VELXY_IMAX → PSC_NE_VEL_IMAX: value is now 100x smaller" }, | ||
| { "PSC_NE_VEL_FILT", "PSC_VELXY_FILT → PSC_NE_VEL_FILT: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_FF", "PSC_VELXY_FF → PSC_NE_VEL_FF: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_FLTE", "PSC_VELXY_FLTE → PSC_NE_VEL_FLTE: no scaling change, name only" }, | ||
| { "PSC_NE_VEL_FLTD", "PSC_VELXY_FLTD → PSC_NE_VEL_FLTD: no scaling change, name only" }, | ||
| // PSC_VELZ → PSC_D_VEL (Copter) | ||
| { "PSC_D_VEL_P", "PSC_VELZ_P → PSC_D_VEL_P: no scaling change, name only" }, | ||
| { "PSC_D_VEL_I", "PSC_VELZ_I → PSC_D_VEL_I: no scaling change, name only" }, | ||
| { "PSC_D_VEL_D", "PSC_VELZ_D → PSC_D_VEL_D: no scaling change, name only" }, | ||
| { "PSC_D_VEL_IMAX", "PSC_VELZ_IMAX → PSC_D_VEL_IMAX: value is now 100x smaller" }, | ||
| { "PSC_D_VEL_FILT", "PSC_VELZ_FILT → PSC_D_VEL_FILT: no scaling change, name only" }, | ||
| { "PSC_D_VEL_FF", "PSC_VELZ_FF → PSC_D_VEL_FF: no scaling change, name only" }, | ||
| { "PSC_D_VEL_FLTE", "PSC_VELZ_FLTE → PSC_D_VEL_FLTE: no scaling change, name only" }, | ||
| { "PSC_D_VEL_FLTD", "PSC_VELZ_FLTD → PSC_D_VEL_FLTD: no scaling change, name only" }, | ||
| // PSC_ACCZ → PSC_D_ACC (Copter) | ||
| { "PSC_D_ACC_P", "PSC_ACCZ_P → PSC_D_ACC_P: value is now 10x smaller" }, | ||
| { "PSC_D_ACC_I", "PSC_ACCZ_I → PSC_D_ACC_I: value is now 10x smaller" }, | ||
| { "PSC_D_ACC_D", "PSC_ACCZ_D → PSC_D_ACC_D: value is now 10x smaller" }, | ||
| { "PSC_D_ACC_IMAX", "PSC_ACCZ_IMAX → PSC_D_ACC_IMAX: no scaling change, name only" }, | ||
| { "PSC_D_ACC_FILT", "PSC_ACCZ_FILT → PSC_D_ACC_FILT: no scaling change, name only" }, | ||
| { "PSC_D_ACC_FF", "PSC_ACCZ_FF → PSC_D_ACC_FF: no scaling change, name only" }, | ||
| { "PSC_D_ACC_FLTE", "PSC_ACCZ_FLTE → PSC_D_ACC_FLTE: no scaling change, name only" }, | ||
| { "PSC_D_ACC_FLTD", "PSC_ACCZ_FLTD → PSC_D_ACC_FLTD: no scaling change, name only" }, | ||
| // RTL (Copter) | ||
| { "RTL_ALT_M", "RTL_ALT → RTL_ALT_M: units changed from cm to m" }, | ||
| { "RTL_SPEED_MS", "RTL_SPEED → RTL_SPEED_MS: units changed from cm/s to m/s" }, | ||
| { "RTL_ALT_FINAL_M", "RTL_ALT_FINAL → RTL_ALT_FINAL_M: units changed from cm to m" }, | ||
| { "RTL_CLIMB_MIN_M", "RTL_CLIMB_MIN → RTL_CLIMB_MIN_M: units changed from cm to m" }, | ||
| // WPNAV (Copter) | ||
| { "WP_ACC", "WPNAV_ACCEL → WP_ACC: units changed from cm/s/s to m/s/s" }, | ||
| { "WP_ACC_CNR", "WPNAV_ACCEL_C → WP_ACC_CNR: units changed from cm/s/s to m/s/s" }, | ||
| { "WP_ACC_Z", "WPNAV_ACCEL_Z → WP_ACC_Z: units changed from cm/s/s to m/s/s" }, | ||
| { "WP_RADIUS_M", "WPNAV_RADIUS → WP_RADIUS_M: units changed from cm to m" }, | ||
| { "WP_SPD", "WPNAV_SPEED → WP_SPD: units changed from cm/s to m/s" }, | ||
| { "WP_SPD_DN", "WPNAV_SPEED_DN → WP_SPD_DN: units changed from cm/s to m/s" }, | ||
| { "WP_SPD_UP", "WPNAV_SPEED_UP → WP_SPD_UP: units changed from cm/s to m/s" }, | ||
| // Q_A (Plane QuadPlane) | ||
| { "Q_A_ANGLE_MAX", "Q_ANGLE_MAX → Q_A_ANGLE_MAX: units changed from cd to deg" }, | ||
| { "Q_A_ACC_R_MAX", "Q_A_ACCEL_R_MAX → Q_A_ACC_R_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_A_ACC_P_MAX", "Q_A_ACCEL_P_MAX → Q_A_ACC_P_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_A_ACC_Y_MAX", "Q_A_ACCEL_Y_MAX → Q_A_ACC_Y_MAX: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_A_RATE_WPY_MAX", "Q_A_SLEW_YAW → Q_A_RATE_WPY_MAX: units changed from cdeg/s to deg/s" }, | ||
| // Q_LOIT (Plane QuadPlane) | ||
| { "Q_LOIT_SPEED_MS", "Q_LOIT_SPEED → Q_LOIT_SPEED_MS: units changed from cm/s to m/s" }, | ||
| { "Q_LOIT_ACC_MAX_M", "Q_LOIT_ACC_MAX → Q_LOIT_ACC_MAX_M: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_LOIT_BRK_ACC_M", "Q_LOIT_BRK_ACCEL → Q_LOIT_BRK_ACC_M: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_LOIT_BRK_JRK_M", "Q_LOIT_BRK_JERK → Q_LOIT_BRK_JRK_M: units changed from cm/s/s/s to m/s/s/s" }, | ||
| // Q_P_VELXY → Q_P_NE_VEL (Plane QuadPlane) | ||
| { "Q_P_NE_VEL_P", "Q_P_VELXY_P → Q_P_NE_VEL_P: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_I", "Q_P_VELXY_I → Q_P_NE_VEL_I: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_D", "Q_P_VELXY_D → Q_P_NE_VEL_D: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_IMAX", "Q_P_VELXY_IMAX → Q_P_NE_VEL_IMAX: value is now 100x smaller" }, | ||
| { "Q_P_NE_VEL_FILT", "Q_P_VELXY_FILT → Q_P_NE_VEL_FILT: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_FF", "Q_P_VELXY_FF → Q_P_NE_VEL_FF: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_FLTE", "Q_P_VELXY_FLTE → Q_P_NE_VEL_FLTE: no scaling change, name only" }, | ||
| { "Q_P_NE_VEL_FLTD", "Q_P_VELXY_FLTD → Q_P_NE_VEL_FLTD: no scaling change, name only" }, | ||
| // Q_P_VELZ → Q_P_D_VEL (Plane QuadPlane) | ||
| { "Q_P_D_VEL_P", "Q_P_VELZ_P → Q_P_D_VEL_P: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_I", "Q_P_VELZ_I → Q_P_D_VEL_I: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_D", "Q_P_VELZ_D → Q_P_D_VEL_D: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_IMAX", "Q_P_VELZ_IMAX → Q_P_D_VEL_IMAX: value is now 100x smaller" }, | ||
| { "Q_P_D_VEL_FILT", "Q_P_VELZ_FILT → Q_P_D_VEL_FILT: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_FF", "Q_P_VELZ_FF → Q_P_D_VEL_FF: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_FLTE", "Q_P_VELZ_FLTE → Q_P_D_VEL_FLTE: no scaling change, name only" }, | ||
| { "Q_P_D_VEL_FLTD", "Q_P_VELZ_FLTD → Q_P_D_VEL_FLTD: no scaling change, name only" }, | ||
| // Q_P_ACCZ → Q_P_D_ACC (Plane QuadPlane) | ||
| { "Q_P_D_ACC_P", "Q_P_ACCZ_P → Q_P_D_ACC_P: value is now 10x smaller" }, | ||
| { "Q_P_D_ACC_I", "Q_P_ACCZ_I → Q_P_D_ACC_I: value is now 10x smaller" }, | ||
| { "Q_P_D_ACC_D", "Q_P_ACCZ_D → Q_P_D_ACC_D: value is now 10x smaller" }, | ||
| { "Q_P_D_ACC_IMAX", "Q_P_ACCZ_IMAX → Q_P_D_ACC_IMAX: no scaling change, name only" }, | ||
| { "Q_P_D_ACC_FILT", "Q_P_ACCZ_FILT → Q_P_D_ACC_FILT: no scaling change, name only" }, | ||
| { "Q_P_D_ACC_FF", "Q_P_ACCZ_FF → Q_P_D_ACC_FF: no scaling change, name only" }, | ||
| { "Q_P_D_ACC_FLTE", "Q_P_ACCZ_FLTE → Q_P_D_ACC_FLTE: no scaling change, name only" }, | ||
| { "Q_P_D_ACC_FLTD", "Q_P_ACCZ_FLTD → Q_P_D_ACC_FLTD: no scaling change, name only" }, | ||
| // Q_WP (Plane QuadPlane) | ||
| { "Q_WP_ACC", "Q_WP_ACCEL → Q_WP_ACC: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_WP_ACC_CNR", "Q_WP_ACCEL_C → Q_WP_ACC_CNR: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_WP_ACC_Z", "Q_WP_ACCEL_Z → Q_WP_ACC_Z: units changed from cm/s/s to m/s/s" }, | ||
| { "Q_WP_RADIUS_M", "Q_WP_RADIUS → Q_WP_RADIUS_M: units changed from cm to m" }, | ||
| { "Q_WP_SPD", "Q_WP_SPEED → Q_WP_SPD: units changed from cm/s to m/s" }, | ||
| { "Q_WP_SPD_DN", "Q_WP_SPEED_DN → Q_WP_SPD_DN: units changed from cm/s to m/s" }, | ||
| { "Q_WP_SPD_UP", "Q_WP_SPEED_UP → Q_WP_SPD_UP: units changed from cm/s to m/s" }, | ||
| }; | ||
|
|
||
| // reverse index: old param name → new param name | ||
| private static readonly Dictionary<string, string> _oldToNew = _byNewParam | ||
| .ToDictionary( | ||
| kv => kv.Value.Substring(0, kv.Value.IndexOf(" →")), | ||
| kv => kv.Key); | ||
|
EosBandi marked this conversation as resolved.
|
||
|
|
||
| /// <summary> | ||
| /// Given an old param name, returns the new 4.7 name, or null if not in the change list. | ||
| /// </summary> | ||
| public static string changedByOldParam(string oldName) | ||
| { | ||
| return _oldToNew.TryGetValue(oldName, out var newName) ? newName : null; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Given a new 4.7 param name, returns the old param name, or null if not in the change list. | ||
| /// </summary> | ||
| public static string changedByNewParam(string newName) | ||
| { | ||
| if (_byNewParam.TryGetValue(newName, out var description)) | ||
| return description.Substring(0, description.IndexOf(" →")); | ||
| return null; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Given a new 4.7 param name, returns the full warning text, or null if not in the change list. | ||
| /// </summary> | ||
| public static string changedByNewParamWarning(string newName) | ||
| { | ||
| return _byNewParam.TryGetValue(newName, out var warning) ? warning : null; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.