Esempio n. 1
0
    def setUpSourceEdge(self, risingEdge: bool, fallingEdge: bool) -> None:
        """Set the edge sensitivity on an up counting source. Set the up
        source to either detect rising edges or falling edges.

        :param risingEdge: True to count rising edge
        :param fallingEdge: True to count falling edge
        """
        if self.upSource is None:
            raise ValueError("Up Source must be set before setting the edge")
        hal.setCounterUpSourceEdge(self.counter, risingEdge, fallingEdge)
Esempio n. 2
0
    def setUpSourceEdge(self, risingEdge: bool, fallingEdge: bool) -> None:
        """Set the edge sensitivity on an up counting source. Set the up
        source to either detect rising edges or falling edges.

        :param risingEdge: True to count rising edge
        :param fallingEdge: True to count falling edge
        """
        if self.upSource is None:
            raise ValueError("Up Source must be set before setting the edge")
        hal.setCounterUpSourceEdge(self.counter, risingEdge, fallingEdge)