As far as I can tell FourWires send method expects command to be an int:
def send(
self, command, data: _typing.ReadableBuffer, *, toggle_every_byte: bool = False
) -> None:
[...]
if not 0 <= command <= 255:
raise ValueError("Command must be an int between 0 and 255")
and at least in my tests, using the FourWire class did not work as I would have expected. For my usecase I found that patching the FourWiresend method and replacing the _send call with
worked. Is this a bug?
Also as I came across while trying to use an e-ink display: It took me some time to find out that the EPaperDisplay class is not functional. Maybe you could replace the pass statements in not implemented methods with a raise NotImplementedError?
As far as I can tell
FourWire
s send method expectscommand
to be an int:and it uses
command
to call_send
:however no int is expected there:
and at least in my tests, using the
FourWire
class did not work as I would have expected. For my usecase I found that patching theFourWire
send
method and replacing the_send
call withworked. Is this a bug? Also as I came across while trying to use an e-ink display: It took me some time to find out that the EPaperDisplay class is not functional. Maybe you could replace the
pass
statements in not implemented methods with araise NotImplementedError
?