You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If write_then_read returns false, then read8 may return an incorrect value. In my case it was just returning 0xFE (PCA9685_PRESCALE) as that was the address that was failing to read. This is problematic since 0xFE is a valid return value (and similarly for other addresses, they may also be valid return values) so errors cannot be distinguished.
It would be better if it could at least detect this error and indicate an error in some manner. read8 is private so could be changed without changing the interface.
The text was updated successfully, but these errors were encountered:
Board: ESP32 (AZ-Delivery Devkit v4)
IDE: VSCode/PlatformIO
The
read8
function does not check for errors when callingwrite_then_read
:Adafruit-PWM-Servo-Driver-Library/Adafruit_PWMServoDriver.cpp
Lines 365 to 369 in 73cf3ec
If
write_then_read
returns false, thenread8
may return an incorrect value. In my case it was just returning0xFE
(PCA9685_PRESCALE
) as that was the address that was failing to read. This is problematic since0xFE
is a valid return value (and similarly for other addresses, they may also be valid return values) so errors cannot be distinguished.It would be better if it could at least detect this error and indicate an error in some manner.
read8
is private so could be changed without changing the interface.The text was updated successfully, but these errors were encountered: