Пример #1
0
    def disablePWM(self):
        """Change this line from a PWM output back to a static Digital Output
        line.

        Free up one of the 6 DO PWM generator resources that were in use.
        """
        if self.pwmGenerator is not self.invalidPwmGenerator:
            return
        hal.setDigitalPWMOutputChannel(self._pwmGenerator, SensorUtil.kDigitalChannels)
        hal.freeDigitalPWM(self._pwmGenerator)
        self._pwmGenerator_finalizer()
Пример #2
0
    def disablePWM(self) -> None:
        """Change this line from a PWM output back to a static Digital Output
        line.

        Free up one of the 6 DO PWM generator resources that were in use.
        """
        if self.pwmGenerator is not self.invalidPwmGenerator:
            return
        hal.setDigitalPWMOutputChannel(self.pwmGenerator, SensorUtil.kDigitalChannels)
        hal.freeDigitalPWM(self.pwmGenerator)
        self._pwmGenerator_finalizer()
Пример #3
0
def _freePWMGenerator(pwmGenerator):
    # Disable the output by routing to a dead bit.
    hal.setDigitalPWMOutputChannel(pwmGenerator, SensorUtil.kDigitalChannels)
    hal.freeDigitalPWM(pwmGenerator)
def _freePWMGenerator(pwmGenerator):
    # Disable the output by routing to a dead bit.
    hal.setDigitalPWMOutputChannel(pwmGenerator, SensorBase.kDigitalChannels)
    hal.freeDigitalPWM(pwmGenerator)