@@ -139,12 +139,7 @@ struct AntiWindupStrategy
139139 }
140140 }
141141
142- void print () const
143- {
144- std::cout << " antiwindup_strat: " << to_string () << " \t i_max: " << i_max << " , i_min: " << i_min
145- << " \t tracking_time_constant: " << tracking_time_constant
146- << " \t error_deadband: " << error_deadband << std::endl;
147- }
142+ void print () const { std::cout << string () << std::endl; }
148143
149144 std::string string () const
150145 {
@@ -326,18 +321,13 @@ class Pid
326321 return true ;
327322 }
328323
329- void print () const
330- {
331- std::cout << " Gains: p: " << p_gain_ << " , i: " << i_gain_ << " , d: " << d_gain_
332- << " , u_max: " << u_max_ << " , u_min: " << u_min_ << std::endl;
333- antiwindup_strat_.print ();
334- }
324+ void print () const { std::cout << string () << std::endl; }
335325
336326 std::string string () const
337327 {
338328 return fmt::format (
339- " Gains(p: {}, i: {}, d: {}, u_max: {}, u_min: {}, antiwindup_strat: {} )" , p_gain_, i_gain_ ,
340- d_gain_, u_max_, u_min_, antiwindup_strat_.string ());
329+ " Gains(p: {}, i: {}, d: {}, u_max: {}, u_min: {}, antiwindup_strat: '{}' )" , p_gain_,
330+ i_gain_, d_gain_, u_max_, u_min_, antiwindup_strat_.string ());
341331 }
342332
343333 double p_gain_ = 0.0 ; /* *< Proportional gain. */
0 commit comments