MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/processing/acs/FrictionCompensationAsync.cpp

42 lines
905 B
C++

/*
* FrictionCompensationProcess.cpp
*
* Created on: 31 ìàÿ 2020 ã.
* Author: LeonidTitov
*/
#include "FrictionCompensationAsync.hh"
void processing::acs::FrictionCompensationAsync::set(
TypeInput speed_stp ) {
torque_feedforward = compensator.update(speed_stp);
output->set(torque_feedforward);
}
processing::acs::FrictionCompensationAsync::TypeOutput processing::acs::FrictionCompensationAsync::get() const {
return torque_feedforward;
}
void processing::acs::FrictionCompensationAsync::set_output(
SetInterface * new_output ) {
output = new_output;
}
void processing::acs::FrictionCompensationAsync::reset() {
output->set( TypeInput( 0.0f, 0.0f ) );
}
processing::acs::FrictionCompensationAsync::FrictionCompensationAsync(
Compensator & compensator ) : compensator(compensator), output(nullptr), torque_feedforward(0.0f, 0.0f) {}