-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mindsensors IR Thermometer often returned invalid values. Most likely this was caused by insufficient error handling. This patch - extends I2C::readByte() and I2C::readWord() to return value by a parameter and use return value solely to indicate read failures or software errors. - adds I2C::getByte() as a wrapper around I2C::readByte() with the simplier API. This useful for methods which never expect -1 to be a valid sensor reading. - replaces all uses of I2C::readByte() by I2C::getByte in MS Line Leader and HiTechnic IR Seeker - uses the new I2C::readWord() API in Mindsensors IR Thermometer to make that on error -1 is returned. - Correctly prints -1 as error code in the test routine
- Loading branch information
1 parent
b5910a7
commit 56e73ff
Showing
7 changed files
with
90 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters