Changeset 15 in flair-src for trunk/lib/FlairFilter/src/Pid.cpp
- Timestamp:
- 04/08/16 15:40:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/Pid.cpp
r10 r15 26 26 using namespace flair::gui; 27 27 28 namespace flair { namespace filter { 28 namespace flair { 29 namespace filter { 29 30 30 Pid::Pid(const LayoutPosition* position,string name) : ControlLaw(position->getLayout(),name) { 31 pimpl_=new Pid_impl(this,position,name); 31 Pid::Pid(const LayoutPosition *position, string name) 32 : ControlLaw(position->getLayout(), name) { 33 pimpl_ = new Pid_impl(this, position, name); 32 34 } 33 35 34 Pid::~Pid(void) { 35 delete pimpl_; 36 } 36 Pid::~Pid(void) { delete pimpl_; } 37 37 38 void Pid::UseDefaultPlot(const gui::LayoutPosition *position) {39 38 void Pid::UseDefaultPlot(const gui::LayoutPosition *position) { 39 pimpl_->UseDefaultPlot(position); 40 40 } 41 41 42 42 void Pid::Reset(void) { 43 pimpl_->i=0;44 pimpl_->first_update=true;43 pimpl_->i = 0; 44 pimpl_->first_update = true; 45 45 } 46 46 47 47 void Pid::UpdateFrom(const io_data *data) { 48 49 48 pimpl_->UpdateFrom(data); 49 ProcessUpdate(output); 50 50 } 51 51 52 void Pid::SetValues(float p, float d) {53 input->SetValue(0,0,p);54 input->SetValue(1,0,d);52 void Pid::SetValues(float p, float d) { 53 input->SetValue(0, 0, p); 54 input->SetValue(1, 0, d); 55 55 } 56 57 56 58 57 } // end namespace filter
Note:
See TracChangeset
for help on using the changeset viewer.