/** * <summary> * Changes the sensibility for the input (between 1 and 1000) for triggering user callbacks. * <para> * The sensibility is used to filter variations around a fixed value, but does not preclude the * transmission of events when the input value evolves constantly in the same direction. * Special case: when the value 1000 is used, the callback will only be thrown when the logical state * of the input switches from pressed to released and back. * 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 sensibility for the input (between 1 and 1000) for triggering user callbacks * </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_sensitivity(int newval) { if (_func == null) { throw new YoctoApiProxyException("No AnButton connected"); } if (newval == _Sensitivity_INVALID) { return(YAPI.SUCCESS); } return(_func.set_sensitivity(newval)); }