-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Description
The whole class is very vulnerable for communication problems on I2C bus!
The methods writeRegister() and readRegister() are using m_i2c_dev->write() and m_i2c_dev->read() which return a bool value, but these are never evaluated.
In this case, one would never recognize if read voltages are actual readings or simply the last successful reading or even the last (un?)successful writing.
It would be easy to convert writeRegister() to return the bool result of m_i2c_dev->write() and to handle this or simply also return the bool result in startComparator_SingleEnded() and startADCReading().
For readRegister() it would require some more refactoring, also read #75 for some thoughts on this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels