MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/processing/acs/FrictionCompensationAsync.cpp
2024-06-07 11:12:56 +03:00

42 lines
909 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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) {}