Alpha 0.1.10/724 fix caching in paramscontroller#725
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements caching optimizations in the parameters controller to improve performance and reduce redundant parameter requests from the drone. The changes introduce cached parameter retrieval methods and modify various controllers to use cached data when available.
- Added caching functionality to the parameters controller with
getCachedParam()method - Updated all controllers to use cached parameters through new
getConfig()methods - Improved test coverage and reduced test execution times
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| radio/app/controllers/paramsController.py | Added getCachedParam() method and automatic caching in getSingleParam() |
| radio/app/controllers/rcController.py | Added getConfig() method using cached parameters and refactored parameter fetching |
| radio/app/controllers/flightModesController.py | Added getConfig() method for cached parameter retrieval |
| radio/app/controllers/frameController.py | Added getConfig() method for cached frame configuration |
| radio/app/controllers/gripperController.py | Split gripper enabled check into cached and non-cached versions |
| radio/app/controllers/navController.py | Added cached loiter radius retrieval and fixed spelling error |
| radio/app/endpoints/ | Updated endpoints to use new getConfig() methods instead of direct property access |
| radio/app/endpoints/states.py | Removed parameter loading logic from state switching |
| radio/tests/ | Updated tests to use shorter timeouts and removed redundant error handling tests |
| gcs/src/ | Added parameter fetching state management to prevent redundant requests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Need to add proper tests for the individual controllers and caching of parameters in another issue. |
* Fix rcController not using cached params, add function to get cached params * Update other controllers to use cached parameters, update drone connection progress messages * Fix type hints * Fix tests * Update radio/app/controllers/paramsController.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update gcs/src/params.jsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix type hint error * Fix type hint error again --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.