Warn the users when they try to edit non-editable parameters#434
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request enhances the parameter editor table by warning users when they attempt to edit non-editable parameters and by clarifying the handling for forced and derived parameters. The key changes include:
- Introducing a new flag to distinguish derived parameters and updating logic accordingly.
- Adding error messages to alert users on edit attempts of non-editable entries.
- Simplifying metadata retrieval with a default empty dictionary.
Comments suppressed due to low confidence (1)
ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.py:323
- It appears that forced parameters are being flagged as derived. To maintain the intended distinction between forced and derived parameters, consider setting 'present_as_forced = True' here and keeping 'present_as_derived = True' only for derived parameters.
present_as_derived = True
Contributor
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Contributor
Test Results 2 files 2 suites 2m 15s ⏱️ Results for commit bc82213. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the parameter editor table in the
ardupilot_methodic_configuratorto better handle "forced" and "derived" parameters. The changes include new logic for displaying derived parameters, error handling for invalid edits, and improved metadata handling.Enhancements to parameter handling:
present_as_derivedto distinguish derived parameters from forced ones, and updated the logic to set this flag accordingly. ([[1]](https://github.com/ArduPilot/MethodicConfigurator/pull/434/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acR309),[[2]](https://github.com/ArduPilot/MethodicConfigurator/pull/434/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acL322-R323))[ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.pyL345-R346](https://github.com/ArduPilot/MethodicConfigurator/pull/434/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acL345-R346))Error handling improvements:
[ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.pyR369-R392](https://github.com/ArduPilot/MethodicConfigurator/pull/434/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acR369-R392))Metadata handling improvement:
[ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_table.pyL639-R664](https://github.com/ArduPilot/MethodicConfigurator/pull/434/files#diff-a1fc77b2f824d73d73195abb5559fad566982d510708937a5c52ba2c86de71acL639-R664))