Skip to content

Commit 355d3bb

Browse files
author
Dilmi Wickramanayake
committed
resolve changes
1 parent 2f9aa38 commit 355d3bb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Data acquisition script that continuously acquires analog output data."""
1+
"""Data acquisition script that continuously generates analog output data."""
22

33
import time
44
from pathlib import Path
@@ -60,7 +60,7 @@
6060
# Refer to your device documentation for more information.
6161
trigger_type = panel.get_value("trigger_type")
6262

63-
if trigger_type == "2":
63+
if trigger_type == 2:
6464
task.triggers.start_trigger.cfg_dig_edge_start_trig(
6565
trigger_source=panel.get_value("digital_source", ""),
6666
trigger_edge=panel.get_value("edge", Edge.FALLING),

examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage_panel.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
run_button = st.button("Run", key="run_button")
4646
else:
4747
st.error(
48-
f"There was an error running the script. Fix the issue and re-run nidaqmx_continuous_analog_input.py \n\n {panel.get_value('daq_error', '')}"
48+
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', '')}"
4949
)
5050

5151
st.title("Channel Settings")
@@ -119,12 +119,13 @@
119119
step=1.0,
120120
disabled=panel.get_value("is_running", False),
121121
)
122-
st.selectbox(
122+
wave_type = st.selectbox(
123123
label="Wave Type",
124124
options=["Sine Wave", "Triangle Wave", "Square Wave"],
125125
key="wave_type",
126126
disabled=panel.get_value("is_running", False),
127127
)
128+
panel.set_value("wave_type", wave_type)
128129

129130
with right_col:
130131
with st.container(border=True):
@@ -176,9 +177,10 @@
176177
],
177178
default=1,
178179
)
180+
trigger_type = int(trigger_type) # pyright: ignore[reportArgumentType]
179181
panel.set_value("trigger_type", trigger_type)
180182

181-
if trigger_type == "2":
183+
if trigger_type == 2:
182184
with st.container(border=True):
183185
source = st.selectbox(
184186
"Source:", options=panel.get_value("available_trigger_sources", [""])

0 commit comments

Comments
 (0)