Open sparky3387 opened 5 years ago
I don't see anything obviously wrong with your code, if you want help with the crash, you have to provide more info, ideally complete backtrace, and also the python code you are using.
BTW, you can do the same with this code:
opcode = cec.CEC_OPCODE_USER_CONTROL_PRESSED
parameters = bytes([keycode])
device.transmit(opcode, parameters)
You will lose the bWait
argument, but in case of CEC_OPCODE_USER_CONTROL_PRESSED
it's noop anyway.
Im trying to modify your library so it supports the inbuilt sendkeypress (and sendkeyrelease), but am having issues, here is what I have come up with so far (it appears to work, but nothing happens and it crashes with a stack smash):