Add frame class#1531
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for a new Frame “Class” field (imported from FC parameters and stored in templates/schema) and expands ESC connection/telemetry cascading behavior using a new ESC_CONNECTION_DICT, including additional GUI/unit/integration tests.
Changes:
- Replace
MOT_PWM_TYPE_DICTwithESC_CONNECTION_DICTincluding explicit ESC->FC telemetry mapping rules. - Update Tkinter editor cascade logic for ESC connection/telemetry (including mirroring/disable rules and width preservation).
- Add/extend tests (unit, integration, and new PyAutoGUI GUI tests) and update templates/schema/docs for Frame Class + BDShotOnly.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_data_model_vehicle_components_validation_constants.py | Updates constant-structure tests to validate ESC_CONNECTION_DICT instead of removed MOT_PWM_TYPE_DICT. |
| tests/unit_data_model_vehicle_components_validation.py | Adds unit coverage for derived ESC protocol choices and telemetry protocol derivation. |
| tests/test_frontend_tkinter_component_editor_integration.py | Stabilizes editor integration tests by patching tkinter.Tk to reuse the provided root. |
| tests/test_frontend_tkinter_component_editor.py | Adds test doubles and new unit tests for ESC cascade/mirroring and single-option auto-select behavior. |
| tests/test_data_model_vehicle_components_import.py | Updates ESC import tests for get_esc_connection_sub_dict and adds Frame Class import test. |
| tests/test_data_model_vehicle_components_base.py | Updates expected telemetry protocol from BDShot to BDShotOnly. |
| tests/gui_frontend_tkinter_component_editor.py | Adds end-to-end GUI regression tests for ESC cascade/mirroring using PyAutoGUI. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/Carisma_SCA-1E/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/AION_R1/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/Heli/OMP_M4/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduPlane/normal_plane/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.6.x/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.5.x/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.5.x-params/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.4.4-params/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.3.8-params/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/X11_plus/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Tarot_X4/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/TarotFY680Hexacopter/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/ReadyToSkyZD550/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Marmotte5v2/vehicle_components.json | Adds Frame.Specifications.Class and renames telemetry protocol to BDShotOnly. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X13/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X11+/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X650_LTE/vehicle_components.json | Adds Frame.Specifications.Class and renames telemetry protocol to BDShotOnly. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500_V2/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/GazeboIrisWithTargetFollow/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/FETtec-5/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Demo32Motor_PeterHall/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Chimera7/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Big_Owl/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/AirCar_v1/vehicle_components.json | Adds Frame.Specifications.Class. |
| ardupilot_methodic_configurator/vehicle_components_schema.json | Extends schema to allow Frame.Specifications.Class. |
| ardupilot_methodic_configurator/frontend_tkinter_component_editor_base.py | Adds helper to repopulate combobox entries without changing widget width. |
| ardupilot_methodic_configurator/frontend_tkinter_component_editor.py | Implements ESC telemetry mirroring/cascade updates and improved combobox validation/auto-select behavior. |
| ardupilot_methodic_configurator/data_model_vehicle_components_validation.py | Introduces ESC_CONNECTION_DICT, ESC telemetry derivation logic, and Frame class constants. |
| ardupilot_methodic_configurator/data_model_vehicle_components_import.py | Imports Frame Class from FC parameters and updates ESC import logic to use ESC_CONNECTION_DICT. |
| TUNING_GUIDE_ArduCopter.md | Updates documentation for BDShotOnly naming. |
Comments suppressed due to low confidence (1)
tests/gui_frontend_tkinter_component_editor.py:1
- Importing
pyautoguiat module import time can fail during test collection in headless/CI environments (missing DISPLAY / OS-level GUI APIs), causing the entire test suite to error even when GUI tests aren't intended to run. Usepytest.importorskip(\"pyautogui\")(or defer the import inside tests/fixtures) and add an explicit marker/skip condition so these tests are only collected/executed in supported GUI environments.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Coverage Report for CI Build 25024853459Coverage increased (+0.03%) to 95.648%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
d2a85cb to
03dff35
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for importing and storing a vehicle “Frame class” in the component editor, including schema/template updates and a regression test.
Changes:
- Import
FRAME_CLASSfrom FC parameters and persist it underFrame.Specifications.Class - Extend the vehicle components JSON schema to allow
Specifications.Class - Populate
Classacross multiple vehicle templates and add a unit test for the import path
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_data_model_vehicle_components_import.py | Adds a unit test asserting FRAME_CLASS is imported into the Frame component. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/Carisma_SCA-1E/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/AION_R1/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/Heli/OMP_M4/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduPlane/normal_plane/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.6.x/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.5.x/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.5.x-params/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.4.4-params/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.3.8-params/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/X11_plus/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Tarot_X4/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/TarotFY680Hexacopter/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/ReadyToSkyZD550/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Marmotte5v2/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X13/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X11+/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X650_LTE/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500_V2/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/GazeboIrisWithTargetFollow/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/FETtec-5/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Demo32Motor_PeterHall/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Chimera7/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Big_Owl/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/AirCar_v1/vehicle_components.json | Adds Frame.Specifications.Class to the template. |
| ardupilot_methodic_configurator/vehicle_components_schema.json | Extends schema to define the new Specifications.Class property for Frame. |
| ardupilot_methodic_configurator/vehicle_components.py | Adds translation strings/description for the new Class field. |
| ardupilot_methodic_configurator/data_model_vehicle_components_validation.py | Introduces a frame-class mapping dict (likely for validation and/or display). |
| ardupilot_methodic_configurator/data_model_vehicle_components_import.py | Imports frame info from FC params and writes it into the component data model. |
Comments suppressed due to low confidence (1)
tests/test_data_model_vehicle_components_import.py:1
- The new behavior is only tested for the “present” case and asserts the numeric code string. Given the code comment “if available” and the potential for overwriting template defaults, add a test that verifies behavior when
FRAME_CLASSis missing (e.g., it should not change an existingFrame.Specifications.Class, or it should remain unset—whichever is intended). IfClassis intended to be a human-readable label, the assertion here should be updated accordingly.
afa3754 to
c8fdc0a
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds “Frame class” support across the vehicle component editor, including validation mappings, FC-parameter import, schema updates, and template defaults.
Changes:
- Introduces
FRAME_CLASS_DICT+get_frame_class_sub_dict()and importsFRAME_CLASSfrom FC into("Frame","Specifications","Frame class") - Extends JSON schema/translatable strings and seeds new/updated templates with a
Frame classfield - Adds unit/integration-style tests covering the new constants and import behavior
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_data_model_vehicle_components_validation_constants.py | Adds tests for FRAME_CLASS_DICT structure/content and get_frame_class_sub_dict() behavior |
| tests/test_data_model_vehicle_components_import.py | Adds test ensuring FRAME_CLASS imports into Frame specifications |
| ardupilot_methodic_configurator/vehicle_templates/Rover/Carisma_SCA-1E/vehicle_components.json | Adds Frame class to Rover template |
| ardupilot_methodic_configurator/vehicle_templates/Rover/AION_R1/vehicle_components.json | Adds Frame class to Rover template |
| ardupilot_methodic_configurator/vehicle_templates/Heli/OMP_M4/vehicle_components.json | Adds Frame class to Heli template |
| ardupilot_methodic_configurator/vehicle_templates/ArduPlane/normal_plane/vehicle_components.json | Adds Frame class to Plane template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.6.x/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.5.x/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.5.x-params/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.4.4-params/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.3.8-params/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/X11_plus/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Tarot_X4/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/TarotFY680Hexacopter/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/ReadyToSkyZD550/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Marmotte5v2/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X13/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X11+/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X650_LTE/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500_V2/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/GazeboIrisWithTargetFollow/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/FETtec-5/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Demo32Motor_PeterHall/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Chimera7/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Big_Owl/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/AirCar_v1/vehicle_components.json | Adds Frame class to Copter template |
| ardupilot_methodic_configurator/vehicle_components_schema.json | Extends schema to allow Frame class under Frame/Specifications |
| ardupilot_methodic_configurator/vehicle_components.py | Adds new translatable label/description for Frame class |
| ardupilot_methodic_configurator/data_model_vehicle_components_validation.py | Adds frame-class mapping dict + helper selector |
| ardupilot_methodic_configurator/data_model_vehicle_components_import.py | Imports FRAME_CLASS and sets Frame component value |
| ardupilot_methodic_configurator/data_model_vehicle_components_base.py | Seeds default JSON structure with Frame class |
Comments suppressed due to low confidence (1)
tests/unit_data_model_vehicle_components_validation_constants.py:1
- These assertions use identity (
is) rather than equality (==). That makes the test unnecessarily strict (it will fail if the implementation later returns an equivalent mapping but not the same object) without changing user-visible behavior. Using==here will keep the test focused on correctness of the returned content rather than the specific object instance.
c8fdc0a to
62f5bd0
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for a “Frame class” field to the component editor by introducing a shared frame-class mapping, importing FRAME_CLASS from FC parameters into the data model, and updating templates/schema/translations accordingly.
Changes:
- Introduce
FRAME_CLASS_DICT+get_frame_class_sub_dict()and add unit tests validating their structure/behavior. - Import
FRAME_CLASSfrom FC parameters into("Frame", "Specifications", "Frame class"), with an integration-style test. - Update JSON schema, i18n strings, and many vehicle templates to include
"Frame class".
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_data_model_vehicle_components_validation_constants.py | Adds unit tests for FRAME_CLASS_DICT and get_frame_class_sub_dict(). |
| tests/test_data_model_vehicle_components_import.py | Adds test ensuring FC FRAME_CLASS imports into the Frame component. |
| ardupilot_methodic_configurator/data_model_vehicle_components_validation.py | Defines FRAME_CLASS_DICT and get_frame_class_sub_dict(). |
| ardupilot_methodic_configurator/data_model_vehicle_components_import.py | Imports FC frame class into the component model during parameter processing. |
| ardupilot_methodic_configurator/data_model_vehicle_components_base.py | Adds default "Frame class": "Undefined" in the generated JSON structure. |
| ardupilot_methodic_configurator/vehicle_components_schema.json | Extends schema with "Frame class" under Frame specifications. |
| ardupilot_methodic_configurator/vehicle_components.py | Adds translatable label/description for “Frame class”. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/Carisma_SCA-1E/vehicle_components.json | Adds "Frame class" to the Rover template. |
| ardupilot_methodic_configurator/vehicle_templates/Rover/AION_R1/vehicle_components.json | Adds "Frame class" to the Rover template. |
| ardupilot_methodic_configurator/vehicle_templates/Heli/OMP_M4/vehicle_components.json | Adds "Frame class" to the Heli template. |
| ardupilot_methodic_configurator/vehicle_templates/ArduPlane/normal_plane/vehicle_components.json | Adds "Frame class" to the Plane template (Undefined). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.6.x/vehicle_components.json | Adds "Frame class" to the Copter template (Undefined). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/empty_4.5.x/vehicle_components.json | Adds "Frame class" to the Copter template (Undefined). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.5.x-params/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.4.4-params/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.3.8-params/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/X11_plus/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Tarot_X4/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/TarotFY680Hexacopter/vehicle_components.json | Adds "Frame class" to the Copter template (Hexa). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/ReadyToSkyZD550/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Marmotte5v2/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X13/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Hoverit_X11+/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X650_LTE/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500_V2/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Holybro_X500/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/GazeboIrisWithTargetFollow/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/FETtec-5/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Demo32Motor_PeterHall/vehicle_components.json | Adds "Frame class" to the Copter template (Scripting Matrix). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Chimera7/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/Big_Owl/vehicle_components.json | Adds "Frame class" to the Copter template (Quad). |
| ardupilot_methodic_configurator/vehicle_templates/ArduCopter/AirCar_v1/vehicle_components.json | Adds "Frame class" to the Copter template (OctaQuad). |
Comments suppressed due to low confidence (3)
tests/unit_data_model_vehicle_components_validation_constants.py:1
- The tests assert identity (
is) rather than behavior (==). This over-constrains the implementation to return the exact same dict instance and will fail ifget_frame_class_sub_dict()is later changed to return a defensive copy or an immutable mapping proxy. Prefer equality assertions (or explicit key/value assertions) unless object identity is part of the intended contract.
tests/unit_data_model_vehicle_components_validation_constants.py:1 - The tests assert identity (
is) rather than behavior (==). This over-constrains the implementation to return the exact same dict instance and will fail ifget_frame_class_sub_dict()is later changed to return a defensive copy or an immutable mapping proxy. Prefer equality assertions (or explicit key/value assertions) unless object identity is part of the intended contract.
tests/unit_data_model_vehicle_components_validation_constants.py:1 - The tests assert identity (
is) rather than behavior (==). This over-constrains the implementation to return the exact same dict instance and will fail ifget_frame_class_sub_dict()is later changed to return a defensive copy or an immutable mapping proxy. Prefer equality assertions (or explicit key/value assertions) unless object identity is part of the intended contract.
| FRAME_CLASS_DICT: dict[str, dict[int, str]] = { | ||
| "ArduCopter": { | ||
| 0: "Undefined", | ||
| 1: "Quad", | ||
| 2: "Hexa", | ||
| 3: "Octa", | ||
| 4: "OctaQuad", | ||
| 5: "Y6", | ||
| 6: "Heli", | ||
| 7: "Tri", | ||
| 8: "SingleCopter", | ||
| 9: "CoaxCopter", | ||
| 10: "BiCopter", | ||
| 11: "Heli_Dual", | ||
| 12: "DodecaHexa", | ||
| 13: "HeliQuad", | ||
| 14: "Deca", | ||
| 15: "Scripting Matrix", | ||
| 16: "6DoF Scripting", | ||
| 17: "Dynamic Scripting Matrix", | ||
| }, | ||
| "Heli": { | ||
| 6: "Heli", | ||
| 11: "Heli_Dual", | ||
| 13: "HeliQuad", | ||
| }, | ||
| "Rover": { | ||
| 0: "Undefined", | ||
| 1: "Rover", | ||
| 2: "Boat", | ||
| 3: "BalanceBot", | ||
| }, | ||
| "ArduPlane": {}, | ||
| } | ||
|
|
||
|
|
||
| def get_frame_class_sub_dict(vehicle_type: str) -> dict[int, str]: | ||
| """Return the vehicle-type-specific frame class mapping from FRAME_CLASS_DICT.""" | ||
| return FRAME_CLASS_DICT.get(vehicle_type, FRAME_CLASS_DICT["ArduCopter"]) |
|
|
||
|
|
||
| def get_frame_class_sub_dict(vehicle_type: str) -> dict[int, str]: | ||
| """Return the vehicle-type-specific frame class mapping from FRAME_CLASS_DICT.""" |
…ame.Specifications.Class use a new FRAME_CLASS_DICT lookup for validating telemetry connection types.
62f5bd0 to
8e55548
Compare
Description
Add a Frame class to the component editor
Checklist
git commit --signoff)Testing
Describe how you tested these changes: