Skip to content

No need to wait after Wire.requestFrom() #10

Open
@Koepel

Description

@Koepel

In the file "Arduino-SRF/src/SonarSRF.cpp" there is a while (Wire.available() < length); after the Wire.requestFrom(). That line can be removed, because there is nothing to wait for.

When the Wire.requestFrom() returns, the I2C transaction on the bus has completely finished and the received data is waiting in a buffer in the Wire library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions