-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80a3892
commit 637df1a
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
MethodicConfigurator/frontend_tkinter_template_overview_window.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env python3 | ||
|
||
''' | ||
This file is part of Ardupilot methodic configurator. https://github.com/ArduPilot/MethodicConfigurator | ||
(C) 2024 Amilcar do Carmo Lucas | ||
SPDX-License-Identifier: GPL-3 | ||
''' | ||
|
||
import tkinter as tk | ||
from tkinter import ttk | ||
|
||
from middleware_template_overview import TemplateOverview | ||
|
||
class TemplateOverviewWindow: | ||
def __init__(self): | ||
self.window = tk.Tk() | ||
self.window.title("ArduPilot methodic configurator - Template Overview") | ||
self.window.geometry("600x400") | ||
|
||
self.template_overview = TemplateOverview() | ||
|
||
# Define the columns for the Treeview | ||
columns = ("FC Manufacturer", "FC Model", "TOW Min [KG]", "TOW Max [KG]", "RC Protocol", "Telemetry Model", "ESC Protocol", "Prop Diameter [inches]", "GNSS Model") | ||
self.tree = ttk.Treeview(self.window, columns=columns, show='headings') | ||
for col in columns: | ||
self.tree.heading(col, text=col) | ||
|
||
# Populate the Treeview with data from the template overview | ||
for item in self.template_overview.__dict__.values(): | ||
self.tree.insert('', 'end', values=(item)) | ||
|
||
self.tree.pack(fill=tk.BOTH, expand=True) | ||
|
||
self.window.mainloop() | ||
|
||
if __name__ == "__main__": | ||
app = TemplateOverviewWindow() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
|
||
''' | ||
This file is part of Ardupilot methodic configurator. https://github.com/ArduPilot/MethodicConfigurator | ||
(C) 2024 Amilcar do Carmo Lucas | ||
SPDX-License-Identifier: GPL-3 | ||
''' | ||
|
||
class TemplateOverview: | ||
def __init__(self): | ||
self.fc_manufacturer = None | ||
self.fc_model = None | ||
self.tow_min_kg = None | ||
self.tow_max_kg = None | ||
self.rc_protocol = None | ||
self.telemetry_model = None | ||
self.esc_protocol = None | ||
self.prop_diameter_inches = None | ||
self.gnss_model = None | ||
|