diff options
author | sara <sara.halter@gmx.ch> | 2021-11-11 20:05:40 +0100 |
---|---|---|
committer | sara <sara.halter@gmx.ch> | 2021-11-11 20:05:40 +0100 |
commit | 1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51 (patch) | |
tree | 98e592e42f27ec2a6bd1db689fc1b4196b4c7573 /src | |
parent | FIR/Fading implementiert (diff) | |
parent | Create ZMQ test (diff) | |
download | Fading-1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51.tar.gz Fading-1e873c7ec474b1af4082aafcd33c0ba7a9fd3d51.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to '')
-rwxr-xr-x | src/gui.py (renamed from src/sketch.py) | 52 | ||||
l--------- | src/qam.py | 1 | ||||
-rw-r--r-- | tests/dearpygui/test.py (renamed from src/Test_Plots/test.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test10.py (renamed from src/Test_Plots/test10.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test1_updating_series_data.py (renamed from src/Test_Plots/test1_updating_series_data.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test2_axis_limis.py (renamed from src/Test_Plots/test2_axis_limis.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test3_custom_axis_labels.py (renamed from src/Test_Plots/test3_custom_axis_labels.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test4_multiple_y_axes.py (renamed from src/Test_Plots/test4_multiple_y_axes.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test5_annotations.py (renamed from src/Test_Plots/test5_annotations.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test6_drag_points_and_lines.py (renamed from src/Test_Plots/test6_drag_points_and_lines.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test7_querying.py (renamed from src/Test_Plots/test7_querying.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test8_custom_context_menus.py (renamed from src/Test_Plots/test8_custom_context_menus.py) | 0 | ||||
-rw-r--r-- | tests/dearpygui/test9_colors_and_styles.py (renamed from src/Test_Plots/test9_colors_and_styles.py) | 0 |
13 files changed, 32 insertions, 21 deletions
diff --git a/src/sketch.py b/src/gui.py index 5f170b2..58e36a3 100755 --- a/src/sketch.py +++ b/src/gui.py @@ -36,7 +36,7 @@ create_viewport() setup_dearpygui() # Show demo for dev -# show_demo() +show_demo() #================================================ # Custom GNURadio blocks @@ -122,25 +122,40 @@ sim.connect((sim.digital_costas_loop_cc_0, 0), (locked_time_plot, 0)) # Settings Window with window(label="Settings", width=200, height=400, pos=(25, 450), tag="sim_win"): - add_button(label="Toggle Fullscreen", callback= toggle_viewport_fullscreen) + with child_window(autosize_x=True, height=100): + add_button(label="Toggle Fullscreen", callback= toggle_viewport_fullscreen) - add_text("Simulation running:") - add_text("false", tag="sim_running_lbl") + with child_window(autosize_x=True): + with group(horizontal=True): + add_text("Simulation running:") + add_text("false", tag="sim_running_lbl") - with group(horizontal=True): - def on_sim_start_btn_clicked(): - sim.start() - sim_runnig = True - logger.debug("Started simulation") + with group(tag="sim_grp", horizontal=True): + def on_sim_start_btn_clicked(): + global sim_running - def on_sim_stop_btn_clicked(): - sim.stop() - sim.wait() - sim_running = False - logger.debug("Stopped simulation") + if sim_running: + logger.error("Simulation is already running") + return - add_button(label="Start", tag="sim_start_btn", callback=on_sim_start_btn_clicked) - add_button(label="Stop", tag="sim_stop_btn", callback=on_sim_stop_btn_clicked) + sim.start() + sim_running = True + logger.debug("Started simulation") + + def on_sim_stop_btn_clicked(): + global sim_running + + if not sim_running: + logger.error("Simulation not running") + return + + sim.stop() + sim.wait() + sim_running = False + logger.debug("Stopped simulation") + + add_button(label="Start", tag="sim_start_btn", callback=on_sim_start_btn_clicked) + add_button(label="Stop", tag="sim_stop_btn", callback=on_sim_stop_btn_clicked) #================================================ # Flow Graph Window @@ -196,8 +211,3 @@ start_dearpygui() # clean up gui destroy_context() - -# Stop GNURadio -if sim_running: - sim.stop() - sim.wait() diff --git a/src/qam.py b/src/qam.py new file mode 120000 index 0000000..a59366b --- /dev/null +++ b/src/qam.py @@ -0,0 +1 @@ +../simulation/QAM/qam_nogui.py
\ No newline at end of file diff --git a/src/Test_Plots/test.py b/tests/dearpygui/test.py index 3fb0d51..3fb0d51 100644 --- a/src/Test_Plots/test.py +++ b/tests/dearpygui/test.py diff --git a/src/Test_Plots/test10.py b/tests/dearpygui/test10.py index d478d9a..d478d9a 100644 --- a/src/Test_Plots/test10.py +++ b/tests/dearpygui/test10.py diff --git a/src/Test_Plots/test1_updating_series_data.py b/tests/dearpygui/test1_updating_series_data.py index 1371008..1371008 100644 --- a/src/Test_Plots/test1_updating_series_data.py +++ b/tests/dearpygui/test1_updating_series_data.py diff --git a/src/Test_Plots/test2_axis_limis.py b/tests/dearpygui/test2_axis_limis.py index bdfeda1..bdfeda1 100644 --- a/src/Test_Plots/test2_axis_limis.py +++ b/tests/dearpygui/test2_axis_limis.py diff --git a/src/Test_Plots/test3_custom_axis_labels.py b/tests/dearpygui/test3_custom_axis_labels.py index be6b80b..be6b80b 100644 --- a/src/Test_Plots/test3_custom_axis_labels.py +++ b/tests/dearpygui/test3_custom_axis_labels.py diff --git a/src/Test_Plots/test4_multiple_y_axes.py b/tests/dearpygui/test4_multiple_y_axes.py index ebaac7e..ebaac7e 100644 --- a/src/Test_Plots/test4_multiple_y_axes.py +++ b/tests/dearpygui/test4_multiple_y_axes.py diff --git a/src/Test_Plots/test5_annotations.py b/tests/dearpygui/test5_annotations.py index 9deff6b..9deff6b 100644 --- a/src/Test_Plots/test5_annotations.py +++ b/tests/dearpygui/test5_annotations.py diff --git a/src/Test_Plots/test6_drag_points_and_lines.py b/tests/dearpygui/test6_drag_points_and_lines.py index c6d8862..c6d8862 100644 --- a/src/Test_Plots/test6_drag_points_and_lines.py +++ b/tests/dearpygui/test6_drag_points_and_lines.py diff --git a/src/Test_Plots/test7_querying.py b/tests/dearpygui/test7_querying.py index 06f3ceb..06f3ceb 100644 --- a/src/Test_Plots/test7_querying.py +++ b/tests/dearpygui/test7_querying.py diff --git a/src/Test_Plots/test8_custom_context_menus.py b/tests/dearpygui/test8_custom_context_menus.py index b459d15..b459d15 100644 --- a/src/Test_Plots/test8_custom_context_menus.py +++ b/tests/dearpygui/test8_custom_context_menus.py diff --git a/src/Test_Plots/test9_colors_and_styles.py b/tests/dearpygui/test9_colors_and_styles.py index 2f1c7ef..2f1c7ef 100644 --- a/src/Test_Plots/test9_colors_and_styles.py +++ b/tests/dearpygui/test9_colors_and_styles.py |