-
-
Notifications
You must be signed in to change notification settings - Fork 545
MAVSDK 2.3.0: Ardupilot system not disconnecting after soft-reboot #2515
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
Comments
As a temporary solution to this problem, I'm probably going to subscribe to that reboot command and unsubscribe and resubscribe to telemetry position when it happens |
tl;dr Rebooting via MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN does not actually make the system disconnect, which is fine, except telemetry subscriptions become stale. I do not know of a way to check if the system has rebooted, because the system stays connected. |
My idea of a solution of listening for MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN did not work, likely due to the system rebooting before the message gets forwarded. Next idea of a solution is to actively track the time since we last received a telemetry position message. If above a threshold value, we stop/start telemetry Edit: For my particular use case, this worked Somewhere in my class I have this. (I plan on refactoring this, but it's just proof of concept). I'm going to probably put this on a different thread
In my class, I have this private variable
In subscribe position:
|
I assume it doesn't actually "see" the disconnect because it appears so quickly, right? I would propose exactly what you do, check for position updates to come, and if they stall, request them again. |
It appears this is the reason. In general, for my use case, I always want telemetry data either way, so probably for the best that I am actively tracking if I am still receiving it. |
I am running into a peculiar issue where MAVSDK isn't detecting a system disconnecting when rebooting the vehicle (by rebooting via QGC vehicle settings, rather than a hard reboot).
This is on Arducopter 4.5.4. The reason it is a problem is that I am subscribing to telemetry position, and upon soft rebooting, the position stops updating, probably because the system is stale after reboot.
This is specifically on MAVSDK 2.3.0.
I created this function to wait for disconnect (based on example code)
This is how I subscribe to telemetry
Is it expected behavior for a system to not be disconnected on MAVSDK if soft rebooting?
The text was updated successfully, but these errors were encountered: