42 lines
909 B
C++
42 lines
909 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) {}
|