/** * <summary> * Records a weight offset thermal compensation table, in order to automatically correct the * measured weight based on the averaged compensation temperature. * <para> * The weight correction will be applied by linear interpolation between specified points. * </para> * <para> * </para> * </summary> * <param name="tempValues"> * array of floating point numbers, corresponding to all averaged * temperatures for which an offset correction is specified. * </param> * <param name="compValues"> * array of floating point numbers, corresponding to the offset correction * to apply for each of the temperature included in the first * argument, index by index. * </param> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public virtual int set_offsetAvgCompensationTable(double[] tempValues, double[] compValues) { if (_func == null) { throw new YoctoApiProxyException("No WeighScale connected"); } return(_func.set_offsetAvgCompensationTable(new List <double>(tempValues), new List <double>(compValues))); }
public void setCompensation(double tempChgRatio, double tempAvgRatio, List <double> deviceTempCompensationValues, List <double> deviceOffsetChgCompensationValues, List <double> deviceOffsetAvgCompensationValues) { _sourceSensor.set_tempChgAdaptRatio(tempChgRatio); _sourceSensor.set_tempAvgAdaptRatio(tempAvgRatio); _sourceSensor.set_offsetChgCompensationTable(deviceTempCompensationValues, deviceOffsetChgCompensationValues); _sourceSensor.set_offsetAvgCompensationTable(deviceTempCompensationValues, deviceOffsetAvgCompensationValues); _sourceSensor.get_module().saveToFlash(); }