Updating parameter value of the object x2out of the "class Connect4",
from "self._slc_led" to "self._slc_output". Also updating the position
of the bit in "_slc_output" from 6 to 0!
The context managers tried to write to the process image in
monitoring=True mode. This is not allowed and the application crashed
with an error.
Signed-off-by: Sven Sager <akira@narux.de>
When leaving the IO context manager, the loop flag was not reset
properly. The context manager could therefore only be traversed once.
Signed-off-by: Sven Sager <akira@narux.de>
This adds the RO device as its own class. The RO device has a special
ioctl function, via which the switching cycles of the relays can be
called up. Relay outputs from the RO device get the additional
attribute 'cycles', which returns the number of switching cycles.
The implementation via RevPiNetIO classes cannot currently be
implemented because the server does not support a return value.
Signed-off-by: Sven Sager <akira@narux.de>
When applying the PiCtory configuration, all IOs are now checked to
see if they overlap with the previous ones. If an overlap is
detected, the IO is ignored and a warning is given to the user.
Signed-off-by: Sven Sager <akira@narux.de>
In the event of a misconfiguration in PiCtory, it may happen that the
offset values are given as floating point numbers. These devices and
their IOs must ignore ModiO that it cannot be ensured which offset
is correct.
Signed-off-by: Sven Sager <akira@narux.de>
The RevPiModIO parameter 'direct_output' was replaced by
'shared_procimg' in the commit c11b435 from 2020-08-08. Users have
received a DepricatedWarning since then. With the upcoming version,
this parameter will be completely deleted.
Refs: c11b435
Signed-off-by: Sven Sager <akira@narux.de>
On February 3, the project was placed under the LGPLv2 license, with
the consent of all contributors. Unfortunately, an incorrect version
of the license was inserted into the LICENSE.txt. This is now fixed
with the text of the LGPLv2, which has been valid for RevPiModIO2
since version 2.6.0.
Refs: 7d482d49
Signed-off-by: Sven Sager <akira@narux.de>
If the IOs cannot be written quickly enough by the ProcimgWriter,
this indicates high system utilization. The cycle function itself
would trigger a different message through the lck_refresh lock.
Signed-off-by: Sven Sager <akira@narux.de>
When using `autofresh` in combination with `shared_procimg`, the
outputs were written to the process image, but kept with old values
in the local buffer. A query to a set output could therefore display
an incorrect value under certain circumstances.
Closes: #25
Signed-off-by: Sven Sager <akira@narux.de>
Classes have accessed a global shared_procimg value during
instantiation. However, this value is managed directly for each
device individually. There can be no global value.
Signed-off-by: Sven Sager <akira@narux.de>
Fixes the bug that with automatic process image update and
shared_procimg, outputs of devices are also written without automatic
update enabled.
Signed-off-by: Sven Sager <akira@narux.de>
In sets, elements can only occur once. Therefore, no `if` statement
has to check whether the element is already included in the list.
Signed-off-by: Sven Sager <akira@narux.de>
When switching to the modular approach, the addresses of a core were
accidentally adopted as a global configuration.
Signed-off-by: Sven Sager <akira@narux.de>