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

42 lines
909 B
C++
Raw Normal View History

2024-06-07 11:12:56 +03:00
/*
* 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) {}