1 Commits

Author SHA1 Message Date
8648a96bce Fixed i2c node not receiving request 2025-05-07 14:33:58 +02:00

View File

@ -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();
}