/**
  * <summary>
  *   Changes the temperature change update rate, in per mille.
  * <para>
  *   The temperature change is updated every 10 seconds, by applying this adaptation rate
  *   to the difference between the measures ambient temperature and the current temperature used for
  *   change compensation. The standard rate is 0.6 per mille, and the maximal rate is 65 per mille.
  *   Remember to call the <c>saveToFlash()</c> method of the module if the
  *   modification must be kept.
  * </para>
  * <para>
  * </para>
  * </summary>
  * <param name="newval">
  *   a floating point number corresponding to the temperature change update rate, in per mille
  * </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_tempChgAdaptRatio(double newval)
 {
     if (_func == null)
     {
         throw new YoctoApiProxyException("No WeighScale connected");
     }
     if (newval == _TempChgAdaptRatio_INVALID)
     {
         return(YAPI.SUCCESS);
     }
     return(_func.set_tempChgAdaptRatio(newval));
 }
 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();
 }