src/libYARP_dev/esdcan/linux/yarp/YARPEsdCanDeviceDriver.cpp
int YARPEsdCanDeviceDriver::setCurrentLimits (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	double *tmp = (double *)cmd;

	int i;
	for (i = 0; i < r.getJoints(); i++)
	{
		if (_writeDWord (CAN_SET_CURRENT_LIMIT, i, S_32(tmp[i])) != YARP_OK)
			return YARP_FAIL;
	}

	return YARP_OK;
}
/// cmd is an array of double
/// LATER: can be optimized.
cmd is an array of double
LATER: can be optimized.
cmd is an array of double LATER : can be optimized .
int YARPEsdCanDeviceDriver::setCurrentLimits (void *cmd)
{
	EsdCanResources& r = RES(system_resources);
	double *tmp = (double *)cmd;
	int i;
	for (i = 0; i < r.getJoints(); i++)
	{
		if (_writeDWord (CAN_SET_CURRENT_LIMIT, i, S_32(tmp[i])) != YARP_OK)
			return YARP_FAIL;
	}
	return YARP_OK;
}
int YARPEsdCanDeviceDriver :: setCurrentLimits ( void * cmd ) { EsdCanResources & r = RES ( system_resources ) ; double * tmp = ( double * ) cmd ; int i ; for ( i = 0 ; i < r . getJoints ( ) ; i ++ ) { if ( _writeDWord ( CAN_SET_CURRENT_LIMIT , i , S_32 ( tmp [ i ] ) ) != YARP_OK ) return YARP_FAIL ; } return YARP_OK ; }
cmd is an array of double
LATER: can be optimized.
cmd is an array of double LATER : can be optimized .