Skip to content
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

GCSVews: Configuration: Compass2: support new compass param names #2726

Merged
merged 2 commits into from Nov 23, 2021

Conversation

IamPete1
Copy link
Member

My first go a C#, so apologies if this is a bit of a mess.

This adds support for the new compass params names proposed in ArduPilot/ardupilot#19123 and allows both new and old to work as before.

@AppVeyorBot
Copy link

GCSViews/ConfigurationView/ConfigHWCompass2.cs Outdated Show resolved Hide resolved
GCSViews/ConfigurationView/ConfigHWCompass2.cs Outdated Show resolved Hide resolved
mavlinkCheckBoxUseCompass1.setup(1, 0, "COMPASS_USE", MainV2.comPort.MAV.param);
mavlinkCheckBoxUseCompass2.setup(1, 0, "COMPASS_USE2", MainV2.comPort.MAV.param);
mavlinkCheckBoxUseCompass3.setup(1, 0, "COMPASS_USE3", MainV2.comPort.MAV.param);
mavlinkCheckBoxUseCompass1.setup(1, 0, get_compass_param_name("USE", 1), MainV2.comPort.MAV.param);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is 2 options here, use what you have done, or pass in both text versions, as the param name field can take an array (havn't checked this, but could be added, as param renames are common these days)

GCSViews/ConfigurationView/ConfigHWCompass2.cs Outdated Show resolved Hide resolved
@IamPete1
Copy link
Member Author

IamPete1 commented Nov 19, 2021

@meee1 your right the array of names method is way better, I have changed to that. I had to add a new method to the param list, but it seems to work as expected.

@meee1
Copy link
Contributor

meee1 commented Nov 19, 2021

nice, i like the approach

@AppVeyorBot
Copy link

@meee1 meee1 merged commit f8622e3 into ArduPilot:master Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants