Dlloydev / QuickPID

A fast PID controller with multiple options. Various Integral anti-windup, Proportional, Derivative and timer control modes.
MIT License
195 stars 50 forks source link

Intellisense has issues with class member definitions #75

Open DrKropp opened 7 months ago

DrKropp commented 7 months ago

I am using the QuickPID library in a project with PlatformIO and VS code on a NodeMCU 32S board. Whenever I try to use any of the class enum keywords intellisense throws a fit that the keyword is not a class member. The project still compiles even with this error, but I hate ignoring the squiggly red underline.

Even the "PID_Basic.ino" example sketch shows this error: "QuickPID::Control::automatic" is not a class memberC/C++(1022)

I am not enough of a C++ programmer to pretend to know how to fix this, but I did see a post that mentioned moving the enums before the class instead of within the class cleared it up.

Screenshot 2024-02-21 164842
Nanowires commented 7 months ago

Instead of referencing the enums from, the objects, you could reference them from the class, i.e.: ~myPID.Control::automatic~ -> QuickPID::Control::automatic

tomelgato commented 4 months ago

Instead of referencing the enums from, the objects, you could reference them from the class, i.e.: ~myPID.Control::automatic~ -> QuickPID::Control::automatic

Stumbled over the same "issue". Class reference works. Its a little bit misleading cause the examples dont work out of the box on PlatformIO