UbiquityRobotics / ubiquity_motor

Package that provides a ROS interface for the motors in UbiquityRobotics robots
BSD 3-Clause "New" or "Revised" License
24 stars 23 forks source link

Test I2C Communication with O_RDONLY #108

Closed dorkamotorka closed 3 years ago

dorkamotorka commented 3 years ago

Macro O_RDWR should be changed to O_RDONLY and tested, because we are only doing the read() call afterwards- O_RDWR is opening file for reading and writing O_RDONLY is opening file for reading

https://github.com/UbiquityRobotics/ubiquity_motor/blob/437d31cdb6ff262c01afd4769900ee93d08b0ea1/src/motor_hardware.cc#L897

mjstn commented 3 years ago

I have gotten around to changing the open to O_RDONLY and it functions fine. I have not actually pushed this because my code is doing other things and is not clean enough.