Skip to content

Commit af78dac

Browse files
committed
esp32 compile error
1 parent ec2d96e commit af78dac

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/common/pid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ PIDController::PIDController(float P, float I, float D, float ramp, float limit)
66
, D(D)
77
, output_ramp(ramp) // output derivative limit [volts/second]
88
, limit(limit) // output supply limit [volts]
9-
, integral_prev(0.0f)
109
, error_prev(0.0f)
1110
, output_prev(0.0f)
11+
, integral_prev(0.0f)
1212
, integral_antiwindup_prev(0.0f)
1313
{
1414
timestamp_prev = _micros();

src/common/pid.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ class PIDController
3131
float limit; //!< Maximum output value
3232

3333
protected:
34-
34+
float error_prev; //!< last tracking error value
3535
float output_prev; //!< last pid output value
3636
float integral_prev; //!< last integral component value
3737
float integral_antiwindup_prev; //!< last integral antiwindup component value
38-
float error_prev; //!< last tracking error value
3938
unsigned long timestamp_prev; //!< Last execution timestamp
4039
};
4140

0 commit comments

Comments
 (0)