-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve feedback on sensor "failure" #2934
Comments
@AndreasAntener |
Only to the console right now. The voter class can output a status though which we could add to the telemetry output. |
I see the print statements. How can I enable this? |
Never mind, it's in the status print |
It only pops up randomly but I just caught it with the status, seems to be mag:
Is there any info in these values towards the problem? Is the detection too sensitive? Does the ID tell me if it's internal or external? This btw happened now on boot via USB inside. We had the same (I assume) yesterday outside via battery. |
It currently uses the absolute error count to switch, rather than an interval error count. We should probably change this to an error density instead to allow for sporadic I2C bus errors, which happen in practice. The density would be errors divided by total reads over a sliding window. I'll have a go at this later today. |
I've changed this to error density on master. This should still disable a failing mag (please test!) but should accept a 1% error count under normal operating conditions. |
We'll probably fly the same setup again this week and see if it still switches or not. I can do a mag disconnect test later today. |
"best" switches from 0 to 1 if I pull the I2C plug. And it switched back to 0 after I reconnected (reported failsafe # 2). On the second try it didn't switch back to 0 anymore (reported failsafe # 3). This is the supposed behaviour? |
The failsafe counter increases on disconnect and reconnect. |
Most likely yes. Does it switch back after some time or not at all? There is a hard limit for the error count (10'000 I2C errors) at which point it won't attempt to switch back. We're not trying to support hot-plug here! |
;) I was actually wondering why it switched back anyway. Once a sensor is in error state I probably don't want to use it anymore. It switched back multiple times now before it stayed at 1. Not sure what was different before. I guess I somehow produced less i2c errors this time. Once it stays at 1 it doesn't seem to go back anymore. |
Wasn't there a command to check i2c errors? (maybe I'm imagining things..). I should probably check for those to see how many our setup produces.. |
@LorenzMeier
We see the message
SENSOR FAILSAFE! RETURN TO LAND IMMEDIATELY
with latest master now and then (in a setup that didn't have any problems so far).As far as I can see this could relate to either gyro, accel or mag. It should output more info on what went wrong exactly. At the moment this message doesn't help.
Is maybe more info logged somewhere?
The text was updated successfully, but these errors were encountered: