petersbingham / dae-py-relay-controller

Python code for controlling Denkovi usb relay boards.
https://denkovi.com/
14 stars 14 forks source link

Expecting Raise Denkovi Exception when initialising wrong board type. #4

Open ghost opened 6 years ago

ghost commented 6 years ago

Hello Peter,

I've detected that , for example, creating an object of dae_Relayboard with DAE_RELAYBOARD_TYPE_8 but initializing it to a 16relays board connected to the system it works fine instead of raising an exception.

It also allows you to use all the native functions (i.e. setAllStatesOn) without any effect to the board, which is logical as it is a different board.

Thanks.

petersbingham commented 6 years ago

Thanks for this. Please feel free to submit a PR.