Commit Graph
69 Commits
Author SHA1 Message Date
akira e54a1ccffc chore: Bump version to 2.9.0
Signed-off-by: Sven Sager <akira@narux.de>
2026-09-01 13:49:42 +02:00
akira 01729506cb chore: Increase to RC2 of upcoming Release 2.9.0
Signed-off-by: Sven Sager <akira@narux.de>
2026-09-01 08:43:26 +02:00
akira f86527b5fd feat: Return -1 to indicate an error in get_switching_cycles method
The old behavior was the return of the maximum value. However, this can
also be a valid value. Now all positive values are valid and a negative
value of -1 describes an error in the query.

close #37

Signed-off-by: Sven Sager <akira@narux.de>
2026-09-01 08:43:26 +02:00
akira a347620a58 fix: Update reset method to return a boolean indicating success
Signed-off-by: Sven Sager <akira@narux.de>
2026-09-01 08:39:06 +02:00
akira 18773b0fa2 chore: Increase to RC1 of upcoming Release 2.9.0
Signed-off-by: Sven Sager <akira@narux.de>
2026-08-31 08:47:38 +02:00
akira b4d23d4e8e style: Format code with black
Signed-off-by: Sven Sager <akira@narux.de>
2026-08-31 08:40:28 +02:00
akira 79dd172f31 feat: Add counter reset function to the MIO module
Due to the new firmware 1.10 on the MIO module, the GPIOs that were
configured as counters can now also be reset to 0. With this change,
the .reset() function in RevPiModIO is added to the respective counter
IOs.
2026-08-31 08:40:28 +02:00
kellergoech 8e42527cd0 Add shared_procimg to run_plc function
Shared Procimg can now also be actrivated when using the run_plc function
2026-04-24 08:29:45 +02:00
akira ef07b6ce4f chore: Bump version to 2.8.1
Signed-off-by: Sven Sager <akira@narux.de>
2026-02-18 10:07:56 +01:00
akira cd64dbcd1b style: Remove redundant whitespaces from docstrings and comments
Cleaned up excessive indentation and unnecessary spacing in docstrings
and comments across multiple files to improve code readability and
maintain consistency.

Signed-off-by: Sven Sager <akira@narux.de>
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz c338069833 docs: enforce 100 character line width in docstrings
Reformatted docstrings across device.py, helper.py, and io.py to honor
the 100 character line width limit, improving readability and
consistency with project formatting standards.
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz 7136a2b23a docs: use inline attribute docstrings for Sphinx compatibility
Added inline docstring documentation for Device class attributes:
- bmk, catalognr, comment, extend, guid, id, inpvariant, outvariant, type

Added inline docstrings for LED and IO attributes in device classes:
- Core: a1green, a1red, a2green, a2red, wd
- Connect: a3green, a3red, x2in, x2out
- ModularBaseConnect_4_5: a1-a5 red/green/blue
- Connect4: x2in, x2out
- Compact: a1green, a1red, a2green, a2red, wd
- Flat: a1-a5 green/red, switch, relais, wd

Translated remaining German text:
- 'Statusbit for piControl-Treiber laeuft' -> 'Status bit indicating piControl driver is running'
- 'Treiber laeuft' -> 'driver is running'
- 'Inputs to Bus schreiben' -> 'Write inputs to bus'
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz 4892adaeff docs: improve watchdog toggle terminology and formatting
Changed 'Autowatchdog' to 'automatic watchdog toggle' for clarity.
Fixed inconsistent indentation in _set_wdtoggle docstring.
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz e7d5bd9fdf docs: fix last German text in io.py docstring
Changed 'wenn Vorzeichenbehaftet' to 'if signed'
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz 3c56eed978 docs: translate German text in docstrings to English
Replaced German terms with English equivalents:
- Zustand → state
- vom → of the
- Ausgang → output
- Sekunden → seconds
- toggeln → toggle
- from → off
- gruen → green
- rot/root → red
- blau → blue
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz bf631ea176 docs: add missing docstrings to classes and methods
Added docstrings to:
- Error classes (RevPiModIOError, DeviceNotFoundError)
- ProductType constants class
- GatewayMixin class for piGate module detection
- IO __call__ methods (IOBase, IntIO, StructIO)
- MemIO.get_variantvalue method
- RevPiModIO context manager methods (__enter__, __exit__)
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz b35edac694 fix: correct typos and complete German translations
- Fix remaining untranslated German text in param descriptions
- Fix typo: 'ist' -> 'is' in error messages
- Fix typo: 'fist' -> 'first' in comment
- Fix typo: 'configuraiton' -> 'configuration'
- Fix typo: 'thrading' -> 'threading' in docstring
- Translate remaining German TODO comment

Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
2026-02-12 14:00:23 +01:00
Nicolai Buchwitz c26841cf94 docs: translate German comments and docstrings to English
Translate all inline comments, docstrings, and documentation from German to English across the codebase to improve accessibility for international developers.

Fixes #27

Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
2026-02-12 14:00:23 +01:00
akira 21d8c523ae chore: Release 2.8.0 2024-11-13 14:11:55 +01:00
akira f50a7744cd chore: Increase to RC2 of upcoming Release 2.8.0 2024-11-12 10:53:47 +01:00
akira 41720ee042 chore: Increase to RC1 of upcoming Release 2.8.0 2024-11-12 09:48:44 +01:00
akira 94ac5c9b92 feat: Add support for RevPi Connect 5 2024-11-08 09:40:09 +01:00
akira f3f81f3633 refactor: Show deprecation warning on root context manager
This context manager can delete the entire instance of ModIO when using
`with rpi:` after creating an instance of ModIO by
`rpi = revpimodio.RevPiModIO(...)`.
2024-11-08 09:37:40 +01:00
akira 579617d223 feat: Add more colors in constants for a RGB status LED
On the Connect 4, the status LEDs are RGB. By switching several LEDs,
further colors can be generated as red, green, blue.
2024-11-08 09:21:05 +01:00
akira 1e331feb2f fix: Resolve constants of internal module 2024-10-28 13:33:44 +01:00
akira 8702c3c8c1 chore: Release 2.7.2 2024-09-23 12:20:26 +02:00
akira 0ba8772d1b fix: Raise error on connect 4 when using wd_toggle function
On the Connect 4, the hardware watchdog was removed from the process
image by KUNBUS. To use the hardware watchdog, other functions must now
be used that are not implemented by RevPiModIO.
2024-09-18 10:57:17 +02:00
akira e8d7860dd2 fix: Colors of constants GREEN and RED match LEDs of RevPi Connect 4
The LED colors for the A1-A5 objects of the .core class of the connect 4
did not match the values of the constants for GREEN and RED, as on all
other RevPi Devices. In addition, the color BLUE was added.
2024-09-18 09:20:21 +02:00
Ayman628 2ac39e2619 fix: Address of x2out on connect 4
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!
2024-09-16 15:17:50 +02:00
akira 9741d13514 chore: Release 2.7.1
Signed-off-by: Sven Sager <akira@narux.de>
2023-12-04 16:01:51 +01:00
akira 41a09c4f17 fix: Context manager crashes in monitoring mode
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>
2023-12-01 15:58:28 +01:00
akira ad4a1fcd38 fix: Error of loop management in the context manager
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>
2023-12-01 15:48:57 +01:00
akira 8df43106e4 chore: Release 2.7.0
Signed-off-by: Sven Sager <akira@narux.de>
2023-11-24 09:45:23 +01:00
akira d5320603f5 feat: Add context manager for modio instance
Signed-off-by: Sven Sager <akira@narux.de>
2023-11-20 12:08:44 +01:00
akira 5a6ed54e5c feat: Add context manager for modio instance
Signed-off-by: Sven Sager <akira@narux.de>
2023-11-20 12:08:42 +01:00
akira 12a34e7d11 docs: Add IO context manager description
Signed-off-by: Sven Sager <akira@narux.de>
2023-11-20 09:12:40 +01:00
akira 01e7109ec9 chore: Increase to RC3 of upcoming Release 2.7.0
Signed-off-by: Sven Sager <akira@narux.de>
2023-11-20 08:42:09 +01:00
akira cc689a58eb feat: Add support for RO device
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>
2023-11-02 16:57:21 +01:00
akira c87f1cceb6 fix: Check if the length of the previous IO overlaps with the new IO
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>
2023-11-01 12:15:27 +01:00
akira 42151e246c fix: Check offset values of the devices for integers
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>
2023-11-01 12:15:27 +01:00
akira f352cb63b6 feat: Remove deprecated parameter 'direct_output' from ModIO classes
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>
2023-11-01 12:15:27 +01:00
akira 1b92241d18 chore: Increase to RC2 of upcoming Release 2.7.0
Signed-off-by: Sven Sager <akira@narux.de>
2023-10-31 12:45:04 +01:00
akira ab2703a4d3 feat: Add context manager for ios
Signed-off-by: Sven Sager <akira@narux.de>
2023-10-27 15:42:18 +02:00
akira 9a90efeaf2 chore: Increase to RC1 of upcoming Release 2.7.0 2023-10-27 15:42:18 +02:00
akira ecf91f56db style: Format everything with black (100 characters per line)
Signed-off-by: Sven Sager <akira@narux.de>
2023-10-27 15:42:18 +02:00
akira 8a8873e54a feat: Import DeviceType on module level
DeviceType can be used for advanced search filters in combination with
RevPiModIOSelected.

Signed-off-by: Sven Sager <akira@narux.de>
2023-09-15 16:35:00 +02:00
akira 9ad8ae0055 feat: Add new and missing ProductTypes to pictory.py module
Signed-off-by: Sven Sager <akira@narux.de>
2023-09-15 16:35:00 +02:00
akira acc59ccaa5 chore: Release 2.6.1
Signed-off-by: Sven Sager <akira@narux.de>
2023-09-09 11:55:49 +02:00
akira b02c4011d7 fix: Changed misleading text of a ProcimgWriter warning
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>
2023-09-09 11:11:57 +02:00
akira 521a0eb589 fix: Wrong values in buffer with autorefresh and shared_procimg active
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>
2023-08-18 08:33:34 +02:00