-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix failsafe bug: Show return altitude field for fixed altitude mode on first load #4629
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
Fix failsafe bug: Show return altitude field for fixed altitude mode on first load #4629
Conversation
…on first load Co-authored-by: nerdCopter <[email protected]>
|
|
@denis-sher , please test |
|
Preview URL: https://pr4629.betaflight-app.pages.dev |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
|
@nerdCopter , working correct now in Preview URL: https://pr4629.betaflight-app.pages.dev/ |



Fixes a bug where the return altitude input field was hidden when GPS rescue failsafe was configured for "fixed altitude" mode on initial page load. Users had to manually change the altitude mode to another option and back to "fixed altitude" to make the field visible.
Problem
The issue occurred in
src/js/tabs/failsafe.jswhere theshowReturnAlt()function was called before the altitude mode select element was populated with the saved configuration value:This caused the function to check the select's default value ("0" - Max Altitude) instead of the actual saved configuration ("1" - Fixed Altitude), incorrectly hiding the field.
Solution
Moved the
showReturnAlt()function call to occur after the altitude mode select value is populated from the saved configuration:Changes
src/js/tabs/failsafe.jsshowReturnAlt()call from line 326 to after line 333Testing
Created a test scenario that demonstrates the fix:
The test shows that with the fix, when GPS rescue is configured for "Fixed Altitude" mode, the return altitude field is correctly visible on first load.
Impact
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
repo.huaweicloud.comnode /usr/local/bin/yarn install(dns block)npm install(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Additional instructions:
Fixes #4628
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.