/** * <summary> * Changes the current threshold (in mA) above which the controller automatically * switches to error state. * <para> * A zero value means that there is no limit. Note that whatever the * current limit is, the controller switches to OVERCURRENT status if the current * goes above 32A, even for a very brief time. Remember to call the <c>saveToFlash()</c> * method of the module if the modification must be kept. * </para> * <para> * </para> * </summary> * <param name="newval"> * an integer corresponding to the current threshold (in mA) above which the controller automatically * switches to error state * </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_overCurrentLimit(int newval) { if (_func == null) { throw new YoctoApiProxyException("No Motor connected"); } if (newval == _OverCurrentLimit_INVALID) { return(YAPI.SUCCESS); } return(_func.set_overCurrentLimit(newval)); }