-
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
Commander : Effectively track failure reporting and handle hotplug sensors #3171
Conversation
d6e9311
to
975828c
Compare
975828c
to
92048e2
Compare
Note to self : Figure out a way to flag external/hotplug sensors during calibration, and not play annoying error tune right at boot before it has come up. |
I would propose to not warn for the first two seconds. After that it's unlikely a sensor will still show up without user intervention. So the first two seconds after boot it should just flag the system as by ready, but not warn via MAVLink or buzzer. |
92048e2
to
329e385
Compare
Implemented. Works perfectly. We don't warn the user for upto 4 seconds after booting (this value was the minimum required one, tested with UAVCAN mag) |
Awesome work! Just going through it now. |
60d01ee
to
3c5bbdc
Compare
OK, I just added some user experience tweaks to warn the user later if sensors fail, etc. This feels very polished now. Timeout is set to 5 seconds, which works fine with USB, but on battery, with the faster boot, and UAVCAN sensors ridiculously taking around 8-9 seconds (after commander starts) to come up, the system starts warning before the sensors come up. |
Hard to tell why it's different on battery without sitting in front of the system. Have you pinged @pavel-kirienko to see why it takes so long to enumerate? |
Ok, so I fixed the remaining small user-experience issues, other than the long enumeration times. The system works exactly as expected now, and warns perfectly in every condition. I checked with all sorts of combinations - bad calibrations, mag unplugged/plugged, uavcan enabled/disabled etc. and it works great! Timeout is set to 8 seconds till Pavel can provide us with faster enumeration times. System won't warn till 8 seconds are over -- but it will still refuse to go to STANDBY silently. But we really need to make sensor enumeration faster. Even with 8 seconds, warnings trigger sometimes. This will vary from system-to-system as well, depending on startup times. I also added a small differentiation between pre-arm and pre-flight. USB power is only checked if we are doing a pre-arm check, not for pre-flight (as in bench tests or otherwise) This can be expanded later to encompass more system checks. |
61a1b9a
to
204fdbb
Compare
204fdbb
to
5fcfdb7
Compare
@LorenzMeier Could you please give a high-level review of this meanwhile ? Does everything look OK, or does anything need more re-factoring/optimization? |
This looks really good. I will cross-test and get this in tomorrow. |
Commander : Effectively track failure reporting and handle hotplug sensors
Now commander will report all issues when a new link is connected. So no messages are lost.
:) Also, with my changes, it will now wait in ARMING_STATE_INIT till all primary sensors come online.
This will need some careful review, but I'm confident this works 100% as tested. Please let me know what else is needed.
New output when link first connects (hotplug sensor not up yet though) :