Example #1
0
 def initAccumulator(self):
     """Initialize the accumulator.
     """
     if not self.isAccumulatorChannel():
         raise IndexError(
             "Accumulators are only available on slot %d on channels %s" %
             (AnalogInput.kAccumulatorSlot, ",".join(
                 str(c) for c in AnalogInput.kAccumulatorChannels)))
     self.accumulatorOffset = 0
     hal.initAccumulator(self.port)
Example #2
0
 def initAccumulator(self):
     """Initialize the accumulator.
     """
     if not self.isAccumulatorChannel():
         raise IndexError(
                 "Accumulators are only available on slot %d on channels %s"
                 % (AnalogInput.kAccumulatorSlot,
                    ",".join(str(c) for c in AnalogInput.kAccumulatorChannels)))
     self.accumulatorOffset = 0
     hal.initAccumulator(self.port)