Exemplo n.º 1
0
    def getPeriod(self) -> float:
        """Get the Period of the most recent count. Returns the time interval
        of the most recent count. This can be used for velocity calculations
        to determine shaft speed.

        :returns: The period of the last two pulses in units of seconds.
        """
        return hal.getCounterPeriod(self.counter)
Exemplo n.º 2
0
    def getPeriod(self) -> float:
        """Get the Period of the most recent count. Returns the time interval
        of the most recent count. This can be used for velocity calculations
        to determine shaft speed.

        :returns: The period of the last two pulses in units of seconds.
        """
        return hal.getCounterPeriod(self.counter)
Exemplo n.º 3
0
    def getPeriod(self):
        """Get the Period of the most recent count. Returns the time interval
        of the most recent count. This can be used for velocity calculations
        to determine shaft speed.

        :returns: The period of the last two pulses in units of seconds.
        :rtype: float
        """
        if self.counter is None:
            raise ValueError("operation on freed port")
        return hal.getCounterPeriod(self.counter)
Exemplo n.º 4
0
    def getPeriod(self):
        """Get the Period of the most recent count. Returns the time interval
        of the most recent count. This can be used for velocity calculations
        to determine shaft speed.

        :returns: The period of the last two pulses in units of seconds.
        :rtype: float
        """
        if self.counter is None:
            raise ValueError("operation on freed port")
        return hal.getCounterPeriod(self.counter)