10 float update(
float setpoint,
float process_value);
28 int derivative_samples_ = 8;
31 int output_samples_ = 1;
33 float threshold_low_ = 0.0f;
34 float threshold_high_ = 0.0f;
35 float kp_multiplier_ = 0.0f;
36 float ki_multiplier_ = 0.0f;
37 float kd_multiplier_ = 0.0f;
38 int deadband_output_samples_ = 1;
40 float min_integral_ = NAN;
41 float max_integral_ = NAN;
46 float proportional_term_;
48 float derivative_term_;
50 void calculate_proportional_term_();
51 void calculate_integral_term_();
52 void calculate_derivative_term_(
float setpoint);
53 float weighted_average_(std::deque<float> &list,
float new_value,
int samples);
54 float calculate_relative_time_();
57 float previous_error_ = 0;
58 float previous_setpoint_ = NAN;
60 float accumulated_integral_ = 0;
61 uint32_t last_time_ = 0;
64 std::deque<float> derivative_list_;
67 std::deque<float> output_list_;
void reset_accumulated_integral()
float update(float setpoint, float process_value)
void set_starting_integral_term(float in)
Implementation of SPI Controller mode.