/** * <summary> * Changes the configuration to tell if entry 4 is used as external sense for * 6-wires load cells. * <para> * Remember to call the <c>saveToFlash()</c> method of the * module if the modification must be kept. * </para> * <para> * </para> * </summary> * <param name="newval"> * either <c>YMultiCellWeighScale.EXTERNALSENSE_FALSE</c> or <c>YMultiCellWeighScale.EXTERNALSENSE_TRUE</c>, * according to the configuration to tell if entry 4 is used as external sense for * 6-wires load cells * </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_externalSense(int newval) { if (_func == null) { throw new YoctoApiProxyException("No MultiCellWeighScale connected"); } if (newval == _ExternalSense_INVALID) { return(YAPI.SUCCESS); } // our enums start at 0 instead of the 'usual' -1 for invalid return(_func.set_externalSense(newval - 1)); }