예제 #1
0
파일: actuator.cpp 프로젝트: helloxss/acado
returnValue Actuator::setParameterDeadTimes(	const DVector& _deadTimes
                                           )
{
    if ( _deadTimes.getDim( ) != getNP( ) )
        return ACADOERROR( RET_INVALID_ARGUMENTS );

    if ( _deadTimes.getMin( ) < 0.0 )
        return ACADOERROR( RET_INVALID_ARGUMENTS );

    if ( deadTimes.getDim( ) == 0 )
        return ACADOERROR( RET_MEMBER_NOT_INITIALISED );

    for( uint i=0; i<getNP(); ++i )
        deadTimes( getNU()+i ) = _deadTimes( i );

    return SUCCESSFUL_RETURN;
}