MaxIV-KitsControls / dev-maxiv-raspberry_pi

Tango DS for the Raspberry Pi GPIO
GNU General Public License v3.0
3 stars 4 forks source link

Quick changes of output attributes does not make any effect. #4

Closed reszelaz closed 6 years ago

reszelaz commented 6 years ago

I need to use 100 ms sleep in between writing output attributes for multiple pins

        import time
        import tango

        raspi_name = "ald/io/raspberrypiio-01"
        raspi_proxy = tango.DeviceProxy(raspi_name)
        axes = [3, 5, 7, 11, 12, 13, 15, 16]
        for axis in axes:
            print("Setting PIN %d to output" % axis)
            raspi_proxy.write_attribute("pin%d_output" % axis, True)
            # add extra wait time, otherwise the only first pin
            # reacts on the request
            time.sleep(.1)

If I don't wait at all only the very first pin reacts.

AntoineDupre commented 6 years ago

Hi Zibi,

Thanks for the report ! I wrote a fix for it, see PR #6

reszelaz commented 6 years ago

Great guys! I will test it whenever I will get back to the lab. It won't be before Friday.

reszelaz commented 6 years ago

I finally could test it. It works perfectly now. Thanks again!