Skip to content

Add frame class#1531

Merged
amilcarlucas merged 4 commits into
masterfrom
add_frame_class
Apr 28, 2026
Merged

Add frame class#1531
amilcarlucas merged 4 commits into
masterfrom
add_frame_class

Conversation

@amilcarlucas
Copy link
Copy Markdown
Collaborator

Description

Add a Frame class to the component editor

Checklist

  • Run pre-commit checks locally
  • Verified by a human programmer
  • All commits are signed off (use git commit --signoff)
  • Code follows our coding standards
  • Documentation updated if needed
  • No breaking changes or properly documented

Testing

Describe how you tested these changes:

  • Unit tests pass
  • Integration tests pass
  • Manual testing performed
  • Tested on flight controller hardware

Copilot AI review requested due to automatic review settings April 19, 2026 23:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_DICT with ESC_CONNECTION_DICT including 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 pyautogui at 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. Use pytest.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.

Comment thread ardupilot_methodic_configurator/vehicle_components_schema.json
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
12593 11867 94% 89% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: ce7cb9d by action🐍

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 20, 2026

Coverage Report for CI Build 25024853459

Coverage increased (+0.03%) to 95.648%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 13763
Covered Lines: 13164
Line Coverage: 95.65%
Relevant Branches: 2360
Covered Branches: 2291
Branch Coverage: 97.08%
Branches in Coverage %: No
Coverage Strength: 3.41 hits per line

💛 - Coveralls

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

Test Results

     4 files  ± 0       4 suites  ±0   41m 38s ⏱️ -53s
 3 638 tests +11   3 636 ✅ +11   2 💤 ±0  0 ❌ ±0 
14 344 runs  +44  14 321 ✅ +44  23 💤 ±0  0 ❌ ±0 

Results for commit ce7cb9d. ± Comparison against base commit 0fb2e6b.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CLASS from FC parameters and persist it under Frame.Specifications.Class
  • Extend the vehicle components JSON schema to allow Specifications.Class
  • Populate Class across 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_CLASS is missing (e.g., it should not change an existing Frame.Specifications.Class, or it should remain unset—whichever is intended). If Class is intended to be a human-readable label, the assertion here should be updated accordingly.

Comment thread ardupilot_methodic_configurator/data_model_vehicle_components_import.py Outdated
Comment thread ardupilot_methodic_configurator/vehicle_components_schema.json
Comment thread ardupilot_methodic_configurator/vehicle_components.py Outdated
@amilcarlucas amilcarlucas force-pushed the add_frame_class branch 2 times, most recently from afa3754 to c8fdc0a Compare April 27, 2026 23:07
@amilcarlucas amilcarlucas requested a review from Copilot April 27, 2026 23:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 imports FRAME_CLASS from FC into ("Frame","Specifications","Frame class")
  • Extends JSON schema/translatable strings and seeds new/updated templates with a Frame class field
  • 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CLASS from 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 if get_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 if get_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 if get_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.

Comment on lines +319 to +357
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."""
@amilcarlucas amilcarlucas merged commit 30bd6c6 into master Apr 28, 2026
30 of 32 checks passed
@amilcarlucas amilcarlucas deleted the add_frame_class branch April 28, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants