Skip to content
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

bugfix: Stop calibration when disconnect battery is received #11987

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

unjambonakap
Copy link
Contributor

@unjambonakap unjambonakap commented Oct 8, 2024

Fixing bug where more popups open when relaunching ESC calibration

Description

Tested with px4.
Launching ESC calibration without battery status fails the check_battery_disconnect() in src/modules/commander/esc_calibration.cpp (px4-autopilot)
Disconnect battery and try again status is sent.
but QGC does not unsubscribe _handleVehicleTextMessage because _stopCalibration is not called (early exit)

-> causes stacking of popups the more we run ESC calibration

Test Steps

Launch ESC calibration without battery status for FC (eg no battery, FC powered by directly).
An error message appears: "Disconnect battery and try again"

Relaunch again
Same error message, this time only a single popup (because _stopCalibration unsubscribes _handleVehicleTextMessage)

Checklist:

Related Issue

@DonLakeFlyer
Copy link
Contributor

Looks good, thanks

@DonLakeFlyer DonLakeFlyer merged commit 14e2ad6 into mavlink:master Oct 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants