-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Analog Output - Continuous #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DilmiWickramanayake
merged 151 commits into
main
from
users/DilmiWickramanayake/Analog_Output_voltage
Aug 4, 2025
Merged
Changes from 149 commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
b7abc39
Analog Input - Voltage and Thermocouple Single Task
aa6488a
Merge branch 'main' of https://github.com/ni/nipanel-python
6d2ec85
Merge branch 'main' of https://github.com/ni/nipanel-python
89d9c2e
Merge branch 'main' of https://github.com/ni/nipanel-python
871f6e1
add niscope
336d7b5
Rename
31e7f0c
Merge branch 'main' of https://github.com/ni/nipanel-python
5f7776f
Merge branch 'main' into users/DilmiWickramanayake/niscope_ex_fetch_f…
1b00959
Merge branch 'main' into users/DilmiWickramanayake/niscope_ex_fetch_f…
5534c9a
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
6083519
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
01a2e08
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
435aedd
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
8dbd7d0
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
b6e43c6
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
9643953
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
66808fb
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
afeb185
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
eb3da14
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
8b9cc4a
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
b27c77f
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
94a0afc
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
0d720c5
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
be1839f
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
4e7e158
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
c394513
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
fe6a780
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
498c199
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
c4d6d7d
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
414257d
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
5b7d789
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
742b685
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
e50dadc
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
838cd70
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
7338e2c
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
e99a548
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
93fede0
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
b2bfe84
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
5cdc785
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
a80d753
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
2056cf3
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
f1395d6
Merge branch 'users/DilmiWickramanayake/niscope_ex_fetch_forever' of …
a8f847b
Analog Input Filtering
24c532b
Merge branch 'main' of https://github.com/ni/nipanel-python into user…
27a8154
Merge branch 'main' of https://github.com/ni/nipanel-python
4d49c37
Merge branch 'main' of https://github.com/ni/nipanel-python
2fedc38
Merge branch 'main' of https://github.com/ni/nipanel-python into user…
8c70ac5
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
4937acd
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
d50204f
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
5d2d549
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
577b344
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
4807eb1
Merge branch 'main' of https://github.com/ni/nipanel-python
0a8da81
Merge branch 'main' into users/DilmiWickramanayake/Analog_Input_filte…
a82f608
Completed Task Settings
c62c497
Merge branch 'main' of https://github.com/ni/nipanel-python
e667025
Merge branch 'main' into users/DilmiWickramanayake/Analog_Input_filte…
39959b5
Merge branch 'main' into users/DilmiWickramanayake/Analog_Input_filte…
0988885
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
0f7ddc1
Added README.md
79ae4db
fixed mypy & lint errors
957ef54
fixed mypy & lint errors
8422770
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
ee296f9
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
a03250b
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
2655fd9
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
9efb83a
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
886623e
Revert changes
28f2209
simple graph changes
709d47e
simple graph changes
372531f
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
a2a803e
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
7c6737b
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
56f5e10
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
374ef68
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
219c2de
Update simple_graph.py
DilmiWickramanayake 809ced3
Poetry lock
fcbc70c
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
e5e2b9b
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
f241821
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
81114c4
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
fd75741
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
3a043a7
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
ee3ff1d
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
ffca8c1
update lint errors
66faa59
update lint errors
29835f5
Merge branch 'main' of https://github.com/ni/nipanel-python
82c2b7f
Merge branch 'main' into users/DilmiWickramanayake/Analog_Input_filte…
a69ad29
fix changes to filtering
2f569a8
fix changes to filtering
fb2b46f
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
c385fb2
changes to poetry lock file
1ab9fa6
changes to poetry lock file
85a7856
Merge branch 'users/DilmiWickramanayake/Analog_Input_filtering' of ht…
6354786
Pyright error
722c3d5
lint error
bbdeb81
fixed errors
065d6f4
Fixed panel comments
3a22846
Fixed panel comments
f48c26b
format number input
92b3260
format number input
68db2a4
adding number format
ee3f07a
lint errors fixed
62aa111
fixing lint errors
d89726c
changed source settings
4ca3b00
setting source up
098d9fb
fixing lint error
5ebf678
d
8a70cd0
Voltage - Continuous Output
3104384
Voltage - Continuous Output
585f3e4
Merge branch 'main' of https://github.com/ni/nipanel-python
015a208
formatting changes
42acc7d
Merge branch 'main' into users/DilmiWickramanayake/Analog_Output_voltage
4add656
matplotlib to echarts
c41d5ef
changed run button
cfdd482
resolve sample rate error
d20cbaa
Daq errors (unfinished)
beedfde
daq errors
eb4ad21
updating daq error display
e0e6c9d
README.md change
ea7efdd
fixing lint errors
81b9c7a
deleted trigger types
a3680b4
error handling
0b858e9
fixing source settings
3f5c35f
fixing lint errors
da485d6
lint error
126d3fb
disable run button
dd9d95b
disable run button
12c2a37
Merge branch 'users/DilmiWickramanayake/Analog_Output_voltage' of htt…
6492de6
delete current example
32c6a78
lint errors
8a31082
removing files
46cf8ae
restructure
b4302cd
space
667bce1
rename
2a00e84
Update nidaqmx_continuous_analog_input_panel.py
DilmiWickramanayake 01c58a7
readme
c3f2df8
Merge branch 'users/DilmiWickramanayake/Analog_Output_voltage' of htt…
2def6b2
poetry lock changes
38b3cc8
Update nidaqmx_continuous_analog_input.py
DilmiWickramanayake 8c0bc34
Update README.md
DilmiWickramanayake 27fb20b
add readme
c4725e4
Merge branch 'users/DilmiWickramanayake/Analog_Output_voltage' of htt…
14db8ff
rename
16cdcc5
run button change
58de63a
remove function
2f9aa38
lint errors
355d3bb
resolve changes
9c82e5b
change triggers
eba2ce8
changes README.md
cc650b5
set run button to false
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| Prerequisites | ||
| =============== | ||
| Requires a Physical or Simulated Device : https://github.com/ni/nidaqmx-python/blob/master/README.rst (Getting Started Section) | ||
|
|
||
| ## Sample | ||
|
|
||
| This is a nipanel example that displays an interactive Streamlit app and updates continuous analog output examples. | ||
|
|
||
| ### Feature | ||
|
|
||
| - Supports various data types | ||
|
|
||
| ### Required Software | ||
|
|
||
| - Python 3.9 or later | ||
|
|
||
| ### Usage | ||
|
|
||
| ```pwsh | ||
| poetry install --with examples | ||
| poetry run examples\nidaqmx_analog_output_voltage\nidaqmx_analog_output_voltage.py | ||
| ``` | ||
104 changes: 104 additions & 0 deletions
104
examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage.py
This file contains hidden or 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,104 @@ | ||
| """Data acquisition script that continuously generates analog output data.""" | ||
|
|
||
| import time | ||
| from pathlib import Path | ||
|
|
||
| import nidaqmx | ||
| import nidaqmx.stream_writers | ||
| import nidaqmx.system | ||
| import numpy as np | ||
| from nidaqmx.constants import AcquisitionType, Edge | ||
| from nidaqmx.errors import DaqError | ||
|
|
||
| import nipanel | ||
|
|
||
| panel_script_path = Path(__file__).with_name("nidaqmx_analog_output_voltage_panel.py") | ||
| panel = nipanel.create_streamlit_panel(panel_script_path) | ||
|
|
||
| system = nidaqmx.system.System.local() | ||
|
|
||
| available_channel_names = [] | ||
| for dev in system.devices: | ||
| for chan in dev.ao_physical_chans: | ||
| available_channel_names.append(chan.name) | ||
| panel.set_value("available_channel_names", available_channel_names) | ||
|
|
||
| available_trigger_sources = [""] | ||
| for dev in system.devices: | ||
| if hasattr(dev, "terminals"): | ||
| for term in dev.terminals: | ||
| available_trigger_sources.append(term) | ||
| panel.set_value("available_trigger_sources", available_trigger_sources) | ||
| try: | ||
| panel.set_value("daq_error", "") | ||
| print(f"Panel URL: {panel.panel_url}") | ||
| print(f"Waiting for the 'Run' button to be pressed...") | ||
| print(f"(Press Ctrl + C to quit)") | ||
| while True: | ||
| panel.set_value("is_running", False) | ||
| while not panel.get_value("run_button", False): | ||
DilmiWickramanayake marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| time.sleep(0.1) | ||
| # How to use nidaqmx: https://nidaqmx-python.readthedocs.io/en/stable/ | ||
| with nidaqmx.Task() as task: | ||
| chan = task.ao_channels.add_ao_voltage_chan( | ||
| panel.get_value("physical_channel", ""), | ||
| max_val=panel.get_value("max_value_voltage", 5.0), | ||
| min_val=panel.get_value("min_value_voltage", -5.0), | ||
| ) | ||
|
|
||
| sample_rate = panel.get_value("rate", 1000.0) | ||
| num_samples = panel.get_value("total_samples", 1000) | ||
| frequency = panel.get_value("frequency", 10.0) | ||
| amplitude = panel.get_value("amplitude", 1.0) | ||
|
|
||
| task.timing.cfg_samp_clk_timing( | ||
| source=panel.get_value("source", ""), # "" - OnboardClock | ||
| rate=sample_rate, | ||
| sample_mode=AcquisitionType.CONTINUOUS, | ||
| ) | ||
| # Not all hardware supports all trigger types. | ||
| # Refer to your device documentation for more information. | ||
| trigger_type = panel.get_value("trigger_type") | ||
|
|
||
| if trigger_type == 2: | ||
DilmiWickramanayake marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| task.triggers.start_trigger.cfg_dig_edge_start_trig( | ||
| trigger_source=panel.get_value("digital_source", ""), | ||
| trigger_edge=panel.get_value("edge", Edge.FALLING), | ||
| ) | ||
|
|
||
| panel.set_value("sample_rate", task.timing.samp_clk_rate) | ||
| t = np.arange(num_samples) / sample_rate | ||
| wave_type = panel.get_value("wave_type", "Sine Wave") | ||
|
|
||
| if wave_type == "Sine Wave": | ||
| waveform = amplitude * np.sin(2 * np.pi * frequency * t) | ||
| elif wave_type == "Square Wave": | ||
| waveform = amplitude * np.sign(np.sin(2 * np.pi * frequency * t)) | ||
| else: | ||
| waveform = amplitude * (2 * np.abs(2 * (t * frequency % 1) - 1) - 1) | ||
|
|
||
| writer = nidaqmx.stream_writers.AnalogSingleChannelWriter( | ||
| task.out_stream, auto_start=False # pyright: ignore[reportArgumentType] | ||
| ) | ||
| writer.write_many_sample(waveform) | ||
| panel.set_value("data", waveform.tolist()) | ||
| try: | ||
| task.start() | ||
| panel.set_value("is_running", True) | ||
| panel.set_value("stop_button", False) | ||
| while not panel.get_value("stop_button", False): | ||
| time.sleep(0.1) | ||
|
|
||
| except KeyboardInterrupt: | ||
| break | ||
| finally: | ||
| task.stop() | ||
| panel.set_value("is_running", False) | ||
|
|
||
| except DaqError as e: | ||
| daq_error = str(e) | ||
| print(daq_error) | ||
| panel.set_value("daq_error", daq_error) | ||
|
|
||
| except KeyboardInterrupt: | ||
| pass | ||
205 changes: 205 additions & 0 deletions
205
examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage_panel.py
This file contains hidden or 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,205 @@ | ||
| """Streamlit visualization script to display data acquired by nidaqmx_analog_output_voltage.py.""" | ||
|
|
||
| import extra_streamlit_components as stx # type: ignore[import-untyped] | ||
| import streamlit as st | ||
| from nidaqmx.constants import Edge | ||
| from streamlit_echarts import st_echarts | ||
|
|
||
| import nipanel | ||
| from nipanel.controls import enum_selectbox | ||
|
|
||
| st.set_page_config(page_title="Voltage - Continuous Output", page_icon="📈", layout="wide") | ||
| st.title("Voltage - Continuous Output") | ||
| panel = nipanel.get_streamlit_panel_accessor() | ||
|
|
||
| left_col, right_col = st.columns(2) | ||
|
|
||
| st.markdown( | ||
| """ | ||
| <style> | ||
| div.stNumberInput { | ||
| max-width: 190px !important; | ||
| } | ||
| div.stTextInput { | ||
| max-width: 190px !important; | ||
| } | ||
|
|
||
| div[data-baseweb="select"] { | ||
| width: 190px !important; /* Adjust the width as needed */ | ||
| } | ||
| </style> | ||
| <style> | ||
| iframe[title="streamlit_echarts.st_echarts"]{ height: 400px; width:100%;} | ||
| </style> | ||
| """, | ||
| unsafe_allow_html=True, | ||
| ) | ||
|
|
||
|
|
||
| with left_col: | ||
| with st.container(border=True): | ||
| is_running = panel.get_value("is_running", True) | ||
| if is_running: | ||
| st.button("Stop", key="stop_button") | ||
| elif not is_running and panel.get_value("daq_error", "") == "": | ||
| run_button = st.button("Run", key="run_button") | ||
| else: | ||
| st.error( | ||
| f"There was an error running the script. Fix the issue and re-run nidaqmx_analog_output_voltage.py \n\n {panel.get_value('daq_error', '')}" | ||
| ) | ||
|
|
||
| st.title("Channel Settings") | ||
| physical_channel = st.selectbox( | ||
| options=panel.get_value("available_channel_names", ["Mod2/ai0"]), | ||
| index=0, | ||
| label="Physical Channels", | ||
| disabled=panel.get_value("is_running", False), | ||
| ) | ||
| panel.set_value("physical_channel", physical_channel) | ||
|
|
||
| max_value_voltage = st.number_input( | ||
| "Max Value", | ||
| value=5.0, | ||
| step=1.0, | ||
| disabled=panel.get_value("is_running", False), | ||
| key="max_value_voltage", | ||
| ) | ||
|
|
||
| min_value_voltage = st.number_input( | ||
| "Min Value", | ||
| value=-5.0, | ||
| step=1.0, | ||
| disabled=panel.get_value("is_running", False), | ||
| key="min_value_voltage", | ||
| ) | ||
| st.title("Timing and Buffer Settings") | ||
|
|
||
| source = st.selectbox( | ||
| "Sample Clock Source", | ||
| options=panel.get_value("available_trigger_sources", [""]), | ||
| index=0, | ||
| disabled=panel.get_value("is_running", False), | ||
| ) | ||
| panel.set_value("source", source) | ||
| st.number_input( | ||
| "Sample Rate", | ||
| value=1000.0, | ||
| min_value=1.0, | ||
| step=1.0, | ||
| disabled=panel.get_value("is_running", False), | ||
| key="rate", | ||
| ) | ||
| st.number_input( | ||
| "Number of Samples", | ||
| value=1000, | ||
| min_value=1, | ||
| step=1, | ||
| disabled=panel.get_value("is_running", False), | ||
| key="total_samples", | ||
| ) | ||
| st.number_input( | ||
| "Actual Sample Rate", | ||
| value=panel.get_value("actual_sample_rate", 1000.0), | ||
| key="actual_sample_rate", | ||
| step=1.0, | ||
| disabled=True, | ||
| ) | ||
| st.title("Waveform Settings") | ||
| st.number_input( | ||
| "Frequency", | ||
| value=panel.get_value("frequency", 10.0), | ||
| key="frequency", | ||
| step=1.0, | ||
| disabled=panel.get_value("is_running", False), | ||
| ) | ||
| st.number_input( | ||
| "Amplitude", | ||
| value=panel.get_value("amplitude", 1.0), | ||
| key="amplitude", | ||
| step=1.0, | ||
| disabled=panel.get_value("is_running", False), | ||
| ) | ||
| wave_type = st.selectbox( | ||
| label="Wave Type", | ||
| options=["Sine Wave", "Triangle Wave", "Square Wave"], | ||
| key="wave_type", | ||
| disabled=panel.get_value("is_running", False), | ||
| ) | ||
| panel.set_value("wave_type", wave_type) | ||
|
|
||
| with right_col: | ||
| with st.container(border=True): | ||
| st.title("Output") | ||
| acquired_data = panel.get_value("data", [0.0]) | ||
| sample_rate = panel.get_value("sample_rate", 1000.0) | ||
| acquired_data_graph = { | ||
| "animation": False, | ||
| "tooltip": {"trigger": "axis"}, | ||
| "legend": {"data": ["Voltage (V)"]}, | ||
| "xAxis": { | ||
| "type": "category", | ||
| "data": [x / sample_rate for x in range(len(acquired_data))], | ||
| "name": "Time", | ||
| "nameLocation": "center", | ||
| "nameGap": 40, | ||
| }, | ||
| "yAxis": { | ||
| "type": "value", | ||
| "name": "Amplitude", | ||
| "nameRotate": 90, | ||
| "nameLocation": "center", | ||
| "nameGap": 40, | ||
| }, | ||
| "series": [ | ||
| { | ||
| "name": "voltage_amplitude", | ||
| "type": "line", | ||
| "data": acquired_data, | ||
| "emphasis": {"focus": "series"}, | ||
| "smooth": True, | ||
| "seriesLayoutBy": "row", | ||
| }, | ||
| ], | ||
| } | ||
| st_echarts(options=acquired_data_graph, height="400px", key="graph", width="100%") | ||
|
|
||
| with st.container(border=True): | ||
| st.title("Trigger Settings") | ||
| trigger_type = stx.tab_bar( | ||
| data=[ | ||
| stx.TabBarItemData(id=1, title="No Trigger", description=""), | ||
| stx.TabBarItemData(id=2, title="Digital Start", description=""), | ||
| stx.TabBarItemData(id=3, title="Digital Pause", description=""), | ||
| stx.TabBarItemData(id=4, title="Digital Reference", description=""), | ||
| stx.TabBarItemData(id=5, title="Analog Start", description=""), | ||
| stx.TabBarItemData(id=6, title="Analog Pause", description=""), | ||
| stx.TabBarItemData(id=7, title="Analog Reference", description=""), | ||
| ], | ||
| default=1, | ||
| ) | ||
| trigger_type = int(trigger_type) # pyright: ignore[reportArgumentType] | ||
| panel.set_value("trigger_type", trigger_type) | ||
|
|
||
| if trigger_type == 2: | ||
| with st.container(border=True): | ||
| source = st.selectbox( | ||
| "Source:", options=panel.get_value("available_trigger_sources", [""]) | ||
| ) | ||
| panel.set_value("digital_source", source) | ||
| enum_selectbox( | ||
| panel, | ||
| label="Edge", | ||
| value=Edge.FALLING, | ||
| disabled=panel.get_value("is_running", False), | ||
| key="edge", | ||
| ) | ||
| elif trigger_type == 1: | ||
| with st.container(border=True): | ||
| st.write( | ||
| "To enable triggers, select a tab above, and configure the settings. Not all hardware supports all trigger types. Refer to your device documentation for more information." | ||
| ) | ||
|
|
||
| else: | ||
| st.write( | ||
| "This trigger type is not supported in output tasks. Refer to your device documentation for more information on which triggers are supported." | ||
| ) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.