clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: Icbc50d46e84ee7ef756705e2b19741439a325074
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/pid/ec/pid.cpp b/pid/ec/pid.cpp
index 6222f1a..762513a 100644
--- a/pid/ec/pid.cpp
+++ b/pid/ec/pid.cpp
@@ -109,8 +109,8 @@
coreContext.derivativeTerm = derivativeTerm;
// FF
- feedFwdTerm =
- (setpoint + pidinfoptr->feedFwdOffset) * pidinfoptr->feedFwdGain;
+ feedFwdTerm = (setpoint + pidinfoptr->feedFwdOffset) *
+ pidinfoptr->feedFwdGain;
coreContext.feedFwdTerm = feedFwdTerm;
@@ -134,8 +134,8 @@
if (pidinfoptr->slewNeg != 0.0f)
{
// Don't decrease too fast
- double minOut =
- pidinfoptr->lastOutput + pidinfoptr->slewNeg * pidinfoptr->ts;
+ double minOut = pidinfoptr->lastOutput +
+ pidinfoptr->slewNeg * pidinfoptr->ts;
coreContext.minOut = minOut;
@@ -147,8 +147,8 @@
if (pidinfoptr->slewPos != 0.0f)
{
// Don't increase too fast
- double maxOut =
- pidinfoptr->lastOutput + pidinfoptr->slewPos * pidinfoptr->ts;
+ double maxOut = pidinfoptr->lastOutput +
+ pidinfoptr->slewPos * pidinfoptr->ts;
coreContext.maxOut = maxOut;
diff --git a/pid/ec/pid.hpp b/pid/ec/pid.hpp
index a6b6c4e..378f93c 100644
--- a/pid/ec/pid.hpp
+++ b/pid/ec/pid.hpp
@@ -19,12 +19,12 @@
*/
typedef struct
{
- bool initialized; // has pid been initialized
+ bool initialized; // has pid been initialized
- double ts; // sample time in seconds
- double integral; // intergal of error
- double lastOutput; // value of last output
- double lastError; // value of last error
+ double ts; // sample time in seconds
+ double integral; // intergal of error
+ double lastOutput; // value of last output
+ double lastError; // value of last error
double proportionalCoeff; // coeff for P
double integralCoeff; // coeff for I
@@ -32,8 +32,8 @@
double feedFwdOffset; // offset coeff for feed-forward term
double feedFwdGain; // gain for feed-forward term
- limits_t integralLimit; // clamp of integral
- limits_t outLim; // clamp of output
+ limits_t integralLimit; // clamp of integral
+ limits_t outLim; // clamp of output
double slewNeg;
double slewPos;
double positiveHysteresis;
diff --git a/pid/ec/stepwise.cpp b/pid/ec/stepwise.cpp
index 0065228..c3e61e8 100644
--- a/pid/ec/stepwise.cpp
+++ b/pid/ec/stepwise.cpp
@@ -32,7 +32,6 @@
for (size_t ii = 1; ii < ec::maxStepwisePoints; ii++)
{
-
if (std::isnan(info.reading[ii]))
{
break;