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

Add Lee Controller as option in Kconfig #1454

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Conversation

logdog
Copy link
Contributor

@logdog logdog commented Feb 5, 2025

Problem Statement

When using the make menuconfig tool, it is currently not possible to select the Lee controller as the controller, even though all other types of controllers defined in src/modules/src/controller/controller.c can be selected. It looks like the Lee controller was simply forgotten about in the Kconfig file, as there are checks to see whether CONFIG_CONTROLLER_LEE is set within the controller.c file here. The Lee Controller was added in #1343 but this PR did not modify the Kconfig file.

Solution

With this PR, one can select the Lee controller as the controller option:

image

Verification

After running make menuconfig and selecting the Lee controller option, the following is put into build/.config:

#
# Controllers and Estimators
#
# CONFIG_CONTROLLER_AUTO_SELECT is not set
# CONFIG_CONTROLLER_PID is not set
# CONFIG_CONTROLLER_INDI is not set
# CONFIG_CONTROLLER_MELLINGER is not set
# CONFIG_CONTROLLER_BRESCIANINI is not set
CONFIG_CONTROLLER_LEE=y
# CONFIG_CONTROLLER_OOT is not set

After make is run, the build/include/generated/autoconf.h will contain the proper preprocessor command

#define CONFIG_CONTROLLER_LEE 1

and then the Lee controller is selected in controller.c. This was also verified in the cfclient tool's Console which logs the DEBUG_PRINT statements.

CONTROLLER: Controller type forced
CONTROLLER: Using Lee (5) controller

@gemenerik gemenerik self-requested a review February 7, 2025 12:35
Copy link
Member

@gemenerik gemenerik left a comment

Choose a reason for hiding this comment

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

Thank you

@gemenerik gemenerik merged commit df0a16d into bitcraze:master Feb 10, 2025
25 checks passed
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.

2 participants