Compare commits
1 Commits
f89e3d580e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8648a96bce |
@ -25,7 +25,7 @@ class MgI2c : public rclcpp::Node {
|
||||
|
||||
rclcpp::Rate rate(100);
|
||||
|
||||
while (ch == 0 || (ch < 256 && ch > 0)) {
|
||||
while (ch == 0 || (ch > 255 || ch < 0)) {
|
||||
ch = i2c_smbus_read_byte(i2c_fd_);
|
||||
rate.sleep();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user