Skip to content

QuickPID::Initialize() is not public #67

@drf5n

Description

@drf5n

On https://github.com/Dlloydev/QuickPID#initialize the README.md highlights the QuickPID::Initialize() function, which is a desirable feature for manual control and tweaking the controller.

QuickPID/README.md

Lines 56 to 61 in 6adfc2c

#### Initialize
```c++
void QuickPID::Initialize();
```

Commercial controllers have a Manual/Auto switch that is often toggled twice to reset things as they are. If the process is oscillating, you can toggle to manual and back, and it often calms the oscillation. The QuickPID::Initialize function would be helpful for this, although the existing user-space workaround of toggling to manual, and back to automatic also works:

myPID.SetMode(myPID.Control::manual);
myPID.SetMode(myPID.Control::automatic);

One interesting use of Initialize() is when using QuickPID as a P-only controller, after the process has approached the setpoint, settling down at some offset, you could Initialize() (or toggle manual-auto) at that point and the controller will use that output level as a new baseline, copying it into the outputSum integral and making it easier for the proportional term to push the residual error down towards zero.

Please move the Initialize() function from private to public so it matches the README.md documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions