Closed julianoes closed 8 years ago
@julianoes @mcharleb Julian,
Perhaps if the mag is left powered on, it can't be reinitialized.
What I would recommend is to enhance the detect function in the mag class to power cycle the mag, in the same way that the get_sensitivity_adjustment method does. This might be enough to make it responsive again.
Jim W.
Thanks @jywilson. I tried to do what you suggested but it didn't work because the I2C transfer itself always seemed to time out. I did some tries to reset the master I2C, and reset the I2C slave. Results were not really conclusive but I haven't seen the problem since. I'll give it some more testing this week.
Unfortunately, the problem is back.
Just to clarify, the mag only has init problems after stopping and restarting the flight stack. Is this correct?
It would probably make sense to modify the unit test to try and repro this issue, just to eliminate possible interactions with the flight stack.
I will try to look at this issue later this week and assign the problem to myself.
Just to clarify, the mag only has init problems after stopping and restarting the flight stack. Is this correct?
Yes correct. I can reproduce it as well using the df_imu_test though, however, this one gets stuck and doesn't seem to return (and doesn't react to Ctrl+C).
I would appreciate your help, I haven't had any luck with all my tries so far.
@jywilson Did you find anything here? Were you able to reproduce it?
The failure is also reproducible on the RPi2 with Navio2.
Fixed by #117.
Sometimes it appears that the MPU9250 doesn't initialize correctly:
Also, trying to start the MPU9250 without mag won't work at that point:
FYI: @jywilson thoughts?