Skip to content

Update IO_PCA9685.cpp#509

Open
digizetkocz wants to merge 1 commit intoDCC-EX:masterfrom
digizetkocz:digizetkocz-patch-1
Open

Update IO_PCA9685.cpp#509
digizetkocz wants to merge 1 commit intoDCC-EX:masterfrom
digizetkocz:digizetkocz-patch-1

Conversation

@digizetkocz
Copy link
Copy Markdown

In the writeregister() function, the I2CAddress type must be used instead of the byte type. The byte type is not sufficient to initialize the servo module when using more than one multiplexer; the servos will not work. Actually, there is no reason to use the byte type in the writeRegister() function . This function is inside the begin() function , to which the I2CAddress type is passed. And the writeRegister() function in turn calls I2CManager.write() , where the I2CAddress type is again used . So the only place where the byte type is is in the writeRegister() function.

In the writeregister() function, the I2CAddress type must be used instead of the byte type. The byte type is not sufficient to initialize the servo module when using more than one multiplexer; the servos will not work.  Actually, there is no reason to use the byte type in the writeRegister() function . This function is inside the begin() function , to which the I2CAddress type is passed. And the writeRegister() function in turn calls I2CManager.write() , where the I2CAddress type is again used . So the only place where the byte type is is in the writeRegister() function.
@pmantoine
Copy link
Copy Markdown
Contributor

Thank you for finding that Filip!

We have a user in the #betatesters channel on our DCC-EX Discord server who may have run into this bug, so I've rolled the fix into the devel branch v5.5.61 for testing. Once @habazut is online he'll no doubt accept the PR into prod.

Feel free to join us on the Discord server too... we are keen to find more software contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants