The goal ArduPilot methodic Configurator software is to automate some of the tasks involved in configuring and tuning ArduPilot-based vehicles. To develop the software the standard V-Model software development method was first used. It was augmented with DevOps and CI/CD automation practices at a later stage.
We decided to use python as programming language, and the following libraries and frameworks:
po
files to translate the software to other languagesThe (main) application itself does the command line parsing and starts the sub-applications defined below in sequence
To satisfy the system design requirements the following user interface sub-applications were developed:
Each sub-application has detailed architecture documentation covering requirements, implementation status, data flow, components, testing, and recommendations:
frontend_tkinter_parameter_editor.py
Each sub-application can be run in isolation, so it is easier to test and develop them.
Each application separates the business logic (data_model_*.py
) from the user interface logic (frontend_tkinter_*.py
).
This improves testability and maintainability of the code.
data_model_fc_ids.py
<- autogenerated by update_flight_controller_ids.py
battery_cell_voltages.py
data_model_vehicle_components_base.py
data_model_vehicle_components_display.py
data_model_vehicle_components_import.py
data_model_vehicle_components_json_schema.py
data_model_vehicle_components_templates.py
data_model_vehicle_components_validation.py
data_model_vehicle_components.py
The detailed data models, components, and dependencies for each sub-application are documented in their respective architecture files linked above.
All applications use one or more of the following shared libraries:
__init__.py
internationalization.py
configuration_steps_strings.py
<- autogenerated by update_configuration_steps_translation.py
vehicle_components.py
<- autogenerated by update_vehicle_components_translation.py
frontend_tkinter_autoresize_combobox.py
frontend_tkinter_base_window.py
frontend_tkinter_entry_dynamic.py
frontend_tkinter_pair_tuple_combobox.py
frontend_tkinter_progress_window.py
frontend_tkinter_rich_text.py
frontend_tkinter_scroll_frame.py
frontend_tkinter_show.py
frontend_tkinter_usage_popup_window.py
When all is combined it looks like this:
The parts can be individually tested, and do have unit tests. They can also be exchanged, for instance, tkinter-frontend can be replaced with wxWidgets or pyQt.
In the future, we might port the entire application into a client-based web application. That way the users would not need to install the software and will always use the latest version.
Several files in the project are automatically generated and should not be manually edited:
data_model_fc_ids.py
<- autogenerated by update_flight_controller_ids.py
configuration_steps_strings.py
<- autogenerated by update_configuration_steps_translation.py
vehicle_components.py
<- autogenerated by update_vehicle_components_translation.py
generate_codebase_pie_chart.py
<- generated by AI assistant for codebase analysis
download_motor_diagrams.py
<- autogenerated by .github/instructions/update_motor_diagrams.md
Note: When calculating code metrics or performing codebase analysis, these generated files should be counted separately from hand-written code to provide accurate development statistics.
To assure code quality we decided to use Microsoft VS code with a lot of extensions to lint the code as you type. We use git pre-commit hooks to check the code before it is committed to the repository.
We tested using automated static tests in both pre-commit hooks and on github CI:
We tested using automated dynamic tests on github CI including automated test coverage reports.
We use unittest to write unit tests for the code.
The tests are easy to run on the command line or in VS code.
When you write new code you must also write tests in the tests/
directory, there is CI test that only passes if test coverage increases monotonically.
To run the tests either use the python tests plugin in visualstudio code, or execute:
pytest
The different sub-applications are first tested independently. Each has detailed testing strategies documented in their respective architecture files:
python .\ardupilot_methodic_configurator\data_model_software_updates.py
python .\ardupilot_methodic_configurator\frontend_tkinter_connection_selection.py
python .\ardupilot_methodic_configurator\frontend_tkinter_directory_selection.py
python .\ardupilot_methodic_configurator\frontend_tkinter_template_overview.py
python .\ardupilot_methodic_configurator\frontend_tkinter_component_editor.py
python .\ardupilot_methodic_configurator\frontend_tkinter_parameter_editor.py
python .\ardupilot_methodic_configurator\frontend_tkinter_motor_test.py
Only after each one performs 100% as expected, they are integrated and tested together. This speeds up the development process.
Here the integrated application was tested against the system requirements defined above. The tests were conducted on windows and Linux machines using multiple different flight controllers and firmware versions. The software is automatically build and distributed using the github CD pipeline.
The software was tested by multiple users with different skill levels, languages, flight controller and backgrounds. The feedback was used to improve the user interface and user experience. The software is ready for production use since November 2024.
The software is feature complete and stable with a user base of hundreds of users, we switched from the V-Model to DevOps development process on November 2024. This provides faster response to requirements changes and additions.
The release process is automated.
To do a release navigate to the bump_version_and_tag workflow
and select Run Workflow
enter the version and the description and press the green Run Workflow
button.