/** * <summary> * Changes immediately the power sent to the motor. * <para> * The value is a percentage between -100% * to 100%. If you want go easy on your mechanics and avoid excessive current consumption, * try to avoid brutal power changes. For example, immediate transition from forward full power * to reverse full power is a very bad idea. Each time the driving power is modified, the * braking power is set to zero. * </para> * <para> * </para> * </summary> * <param name="newval"> * a floating point number corresponding to immediately the power sent to the motor * </param> * <para> * </para> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public int set_drivingForce(double newval) { if (_func == null) { throw new YoctoApiProxyException("No Motor connected"); } if (newval == _DrivingForce_INVALID) { return(YAPI.SUCCESS); } return(_func.set_drivingForce(newval)); }