Skip to content

feat: add IQmath format support for pid_ctrl (IEC-513)#719

Open
Vorrad wants to merge 1 commit intoespressif:masterfrom
Vorrad:feat/pid_ctrl_iq_format
Open

feat: add IQmath format support for pid_ctrl (IEC-513)#719
Vorrad wants to merge 1 commit intoespressif:masterfrom
Vorrad:feat/pid_ctrl_iq_format

Conversation

@Vorrad
Copy link
Copy Markdown
Contributor

@Vorrad Vorrad commented Apr 3, 2026

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined
  • Component was added to upload job
  • Component was added to build job
  • Optional: Component contains unit tests
  • CI passing

Change description

Please describe your change here

Comment thread pid_ctrl/src/pid_ctrl.c Fixed
Comment thread pid_ctrl/src/pid_ctrl.c Fixed
@github-actions github-actions Bot changed the title feat: add IQmath format support for pid_ctrl feat: add IQmath format support for pid_ctrl (IEC-513) Apr 3, 2026
@Vorrad Vorrad force-pushed the feat/pid_ctrl_iq_format branch 2 times, most recently from 72b8680 to 95e8b64 Compare April 3, 2026 07:39
@suda-morris
Copy link
Copy Markdown
Collaborator

Did you consider using the _Generic to support both the float and IQ formats, instead of relying on the Kconfig choice?

https://www.runoob.com/w3cnote/c-general-function.html?utm_source=copilot.com

@Vorrad

@Vorrad Vorrad force-pushed the feat/pid_ctrl_iq_format branch from 95e8b64 to cf4097c Compare April 24, 2026 03:28
Comment thread pid_ctrl/Kconfig Outdated
default n
help
When enabled, pid_ctrl exposes a second set of *_iq APIs using
Espressif IQmath. The float and IQ backends can be used in the
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

如果iq版本和float版本可以共存,为什么还需要这个Kconfig?

Comment thread pid_ctrl/CMakeLists.txt
@@ -1,4 +1,6 @@
set(srcs "src/pid_ctrl.c")
set(requires "iqmath")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

应该不需要了,已经通过idf_component.yml注入了依赖了

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

测试下来不加会报错。之前也遇到过这种情况,idf_component.yml的依赖没有成功被添加。

@Vorrad Vorrad force-pushed the feat/pid_ctrl_iq_format branch from cf4097c to 9fd445f Compare April 27, 2026 04:07
@Vorrad Vorrad force-pushed the feat/pid_ctrl_iq_format branch from 9fd445f to fcb71b2 Compare April 27, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants