Exemplo n.º 1
0
    def resetAccumulator(self):
        """Resets the accumulator to the initial value.
        """
        hal.resetAccumulator(self.port)

        # Wait until the next sample, so the next call to getAccumulator*()
        # won't have old values.
        sampleTime = 1.0 / AnalogInput.getGlobalSampleRate()
        overSamples = 1 << self.getOversampleBits()
        averageSamples = 1 << self.getAverageBits()
        Timer.delay(sampleTime * overSamples * averageSamples)
Exemplo n.º 2
0
    def resetAccumulator(self):
        """Resets the accumulator to the initial value.
        """
        hal.resetAccumulator(self.port)

        # Wait until the next sample, so the next call to getAccumulator*()
        # won't have old values.
        sampleTime = 1.0 / AnalogInput.getGlobalSampleRate()
        overSamples = 1 << self.getOversampleBits()
        averageSamples = 1 << self.getAverageBits()
        Timer.delay(sampleTime * overSamples * averageSamples)