sphero-inc / sphero-sdk-raspberrypi-python

Sphero RVR SDK to run on Raspberry Pi using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't change port with python SpheroRvrObserver

cletusw opened this issue · comments

With the asyncio code I can properly set the port the Pi should use to communicate with the RVR (my Pi is set up as a USB Serial Gadget).

rvr = SpheroRvrAsync(
    dal=SerialAsyncDal(
        loop,
        port_id = "/dev/ttyGS0"
    )
)

SpheroRvrObserver, however, does not accept a dal parameter and so changing the port is not possible. Could this be added as an option?

Hi @cletusw, this is a good suggestion, and may go into a future update to the SDK. In the meantime, you can edit the port in sphero_sdk/observer/client/dal/serial_observer_dal.py. This will work, though I realize it's not ideal.

Thanks! Glad to hear it's being considered.