Interesting update
This update extends our module with the following features:
- Handles errors of the function which is passed to the cycleloop.
This version manages errors thrown by the source code of the function which is passed to the cycleloop. The RevPiModIO module is put into a clean state and throws the error after that. If this error is intercepted by the programmer, the cylcleloop can be restarted.# (...) try: rpi.cycleloop(cyclefunction) except: # Handle errors, log and # if necessary restart the cycleloop # (...)
- Handles errors of the function that are executed by the event monitoring (mainloop).
This version manages errors thrown by the source code of the event functions. The RevPiModIO module is put into a clean state and throws the error after that. If this error is intercepted by the programmer, the mainloop can be restarted.# (...) try: rpi.mainloop() except: # Handle errors, log and # if necessary restart the mainloop # (...)
- Clear error output after incorrect instantiation of the module.
- Correction of the return value of
ioobject in device.devicename
if using a IOBase or inherited object.