Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
 Adds the SetOutputSum(sum); function
  • Loading branch information
Dlloydev committed Jun 10, 2023
1 parent 9655589 commit c3f64fa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void SetSampleTimeUs(uint32_t NewSampleTimeUs); // Set PID compute sample time,
void SetProportionalMode(pMode pMode); // Set pTerm based on error (default), measurement, or both
void SetDerivativeMode(dMode dMode); // Set the dTerm, based error or measurement (default).
void SetAntiWindupMode(iAwMode iAwMode); // Set iTerm anti-windup to iAwCondition, iAwClamp or iAwOff
void SetOutputSum(float sum); // sets the output summation value
```
### Autotuner
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "QuickPID",
"version": "3.1.8",
"version": "3.1.9",
"description": "A fast PID controller with multiple options. Various Integral anti-windup, Proportional, Derivative and timer control modes.",
"keywords": "PID, controller, signal, autotune, tuner, stune",
"repository":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=QuickPID
version=3.1.8
version=3.1.9
author=David Lloyd
maintainer=David Lloyd <dlloydev@testcor.ca>
sentence=A fast PID controller with multiple options. Various Integral anti-windup, Proportional and Derivative control modes.
Expand Down
7 changes: 6 additions & 1 deletion src/QuickPID.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**********************************************************************************
QuickPID Library for Arduino - Version 3.1.8
QuickPID Library for Arduino - Version 3.1.9
by dlloydev https://github.com/Dlloydev/QuickPID
Based on the Arduino PID_v1 Library. Licensed under the MIT License.
**********************************************************************************/
Expand Down Expand Up @@ -262,6 +262,11 @@ void QuickPID::Reset() {
dTerm = 0;
}

// sets the output summation value
void QuickPID::SetOutputSum(float sum) {
outputSum = sum;
}

/* Status Functions************************************************************
These functions query the internal state of the PID.
******************************************************************************/
Expand Down
3 changes: 3 additions & 0 deletions src/QuickPID.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class QuickPID {
void SetAntiWindupMode(iAwMode iAwMode);
void SetAntiWindupMode(uint8_t IawMode);

// sets the output summation value
void SetOutputSum(float sum);

void Initialize(); // Ensure a bumpless transfer from manual to automatic mode
void Reset(); // Clears pTerm, iTerm, dTerm and outputSum values

Expand Down

0 comments on commit c3f64fa

Please sign in to comment.