Skip to content

Commit eec89c3

Browse files
committed
feat(component editor): allow debuging just the component editor window
1 parent 9951eec commit eec89c3

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@
4545
"--device=COM6",
4646
"--loglevel=DEBUG"
4747
]
48+
},
49+
{
50+
"name": "Python Debugger: frontend_tkinter_component_editor.py",
51+
"type": "debugpy",
52+
"request": "launch",
53+
"program": "ardupilot_methodic_configurator/frontend_tkinter_component_editor.py",
54+
"args": [
55+
"--vehicle-dir=ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params",
56+
"--allow-editing-template-files",
57+
"--loglevel=DEBUG"
58+
]
4859
}
4960
]
5061
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@
5959
},
6060
"files.eol": "\n",
6161
"github.copilot.chat.agent.thinkingTool": true,
62-
"chat.agent.enabled": true
62+
"chat.agent.enabled": true,
63+
"python-envs.pythonProjects": []
6364
}

ardupilot_methodic_configurator/frontend_tkinter_component_editor.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,11 @@ def derive_initial_template_name(self, component_data: dict[str, Any]) -> str:
797797
filesystem = LocalFilesystem(
798798
args.vehicle_dir, args.vehicle_type, "", args.allow_editing_template_files, args.save_component_to_system_templates
799799
)
800-
app = ComponentEditorWindow(__version__, filesystem)
801-
app.root.mainloop()
800+
component_editor_window = ComponentEditorWindow(__version__, filesystem)
801+
802+
component_editor_window.populate_frames()
803+
if args.skip_component_editor:
804+
component_editor_window.root.after(10, component_editor_window.root.destroy)
805+
806+
component_editor_window.root.mainloop()
802807
# pylint: enable=duplicate-code

ardupilot_methodic_configurator/vehicle_templates/ArduCopter/diatone_taycan_mxc/4.6.x-params/vehicle_components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"Firmware": {
1212
"Type": "ArduCopter",
13-
"Version": "4.6.x"
13+
"Version": "4.6.0"
1414
},
1515
"Specifications": {
1616
"MCU Series": "STM32H7xx"

0 commit comments

Comments
 (0)