Version 2.7.0

  • Add context manager for ios
  • Remove deprecated parameter ‘direct_output’ from ModIO classes
  • Check offset values of the devices for integers
  • Check if the length of the previous IO overlaps with the new IO
  • Add support for RO device
  • Add context manager for modio instance

With the new context managers, the IOs can be more easily combined with your own cycles. When entering the context manager, the inputs are read, within the context manager outputs are stable and will not change on hardware and when exiting, all outputs are written.

import revpimodio2

revpi = revpimodio2.RevPiModIO()

with revpi.io:
    revpi.io.O_1.value = not revpi.io.O_1.value

The autorefresh=True argument does not have to be set in this case, as the context manager takes care of updating the process image.