Pi4J / pi4j-v2

Pi4J Version 2.0
Apache License 2.0
273 stars 57 forks source link

fix(io): IOBase constructor do not update the fields id, name & description #344

Closed fusetim closed 5 months ago

fusetim commented 5 months ago

The classes extending IOBase were already updating those fields (except SerialBase). SerialBase was the only class missing this change.

These changes allow the user to use multiple Serial interface at the same time. It was impossible before, as Pi4J would throw IOAlreadyExistsException.

This commit "moves" the fixes for the similar issues in the SPI interface. It also moves the similar code found in the dependency classes in the IOBase class.

Ref: #244, #257 Closes: #257

eitch commented 5 months ago

You may change your PR to be ready for pulling