DavidEGrayson/minimu9-rpi-ahrs — pull request #1 by thesummer (2012-08-27 18:14:49+00:00)
Title: Changed behaviour of the file descriptor for the I2C-device

I changed the class I2C-bus in a way that it does not have a single file descriptor it has to change every time a sensor requests access, but every I2C-device registers itself to the bus and gets its own fd.
This way issuing the system call ioctl extensively can be avoided which may be better for real time systems like xenomai.
The sensor classes have been changed accordingly.
Only regression so far is that the constructor I2CBus(int fd) had to be removed (but it was not used so far).
Opening a device without knowing the device name (as in this case) is apparently not as easy as I thought in the beginning, but needed to assign each sensor an own fd.
It would be possible though, but IMHO not in a clean and easy way.

I reverted the changes in the register addresses I made to get the program running with minIMU9 v1, so it should still work with your version.
I only tested the program in raw mode (lacking a calibration file). But as I did not change any math-relating code the other modes shouldn't be affected?

I don't know if you agree with these decisions, but I thought I let you know ;-)