How to use the wasabi.Wasabi.IR.LircTransmitError function in wasabi

To help you get started, we’ve selected a few wasabi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scanlime / navi-misc / wasabi / Wasabi / IR.py View on Github external
def write(self, command):
        """Write a preformatted command line to lircd"""
        os.write(self.socket.fileno(), command)

        # Read the response packet lircd sends back, everything between BEGIN and END
        response = []
        while self.socketf.readline().strip() != "BEGIN":
            pass
        while True:
            line = self.socketf.readline().strip()
            if line == "END":
                break
            response.append(line)

        if response[0].strip() != command.strip():
            raise LircTransmitError("Command was not echoed")

        if response[1] != "SUCCESS":
            raise LircTransmitError(response[-1])
github scanlime / navi-misc / wasabi / Wasabi / IR.py View on Github external
# Read the response packet lircd sends back, everything between BEGIN and END
        response = []
        while self.socketf.readline().strip() != "BEGIN":
            pass
        while True:
            line = self.socketf.readline().strip()
            if line == "END":
                break
            response.append(line)

        if response[0].strip() != command.strip():
            raise LircTransmitError("Command was not echoed")

        if response[1] != "SUCCESS":
            raise LircTransmitError(response[-1])