Skip to content

Commit ded87ce

Browse files
author
Dilmi Wickramanayake
committed
deleting unecessary variables
1 parent d0cb228 commit ded87ce

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

examples/nidaqmx/nidaqmx_analog_input_filtering/nidaqmx_analog_input_filtering_panel.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152

153153
with right_col:
154154
st.title("Task Types")
155-
chosen_id = stx.tab_bar(
155+
chan_type = stx.tab_bar(
156156
data=[
157157
stx.TabBarItemData(id=1, title="Voltage", description=""),
158158
stx.TabBarItemData(id=2, title="Current", description=""),
@@ -161,10 +161,9 @@
161161
default=1,
162162
)
163163

164-
chan_type = chosen_id
165164
panel.set_value("chan_type", chan_type)
166165

167-
if chosen_id == "1":
166+
if chan_type == "1":
168167
with st.container(border=True):
169168
st.title("Voltage Data")
170169
channel_left, channel_right = st.columns(2)
@@ -185,7 +184,7 @@
185184
key="min_value_voltage",
186185
)
187186

188-
if chosen_id == "2":
187+
if chan_type == "2":
189188
with st.container(border=True):
190189
st.title("Current Data")
191190
channel_left, channel_right = st.columns(2)
@@ -224,7 +223,7 @@
224223
step=1.0,
225224
disabled=panel.get_value("is_running", False),
226225
)
227-
if chosen_id == "3":
226+
if chan_type == "3":
228227
with st.container(border=True):
229228
st.title("Strain Gage Data")
230229
channel_left, channel_right = st.columns(2)
@@ -311,7 +310,7 @@
311310
)
312311

313312
st.title("Trigger Settings")
314-
id = stx.tab_bar(
313+
trigger_type = stx.tab_bar(
315314
data=[
316315
stx.TabBarItemData(id=1, title="No Trigger", description=""),
317316
stx.TabBarItemData(id=2, title="Digital Start", description=""),
@@ -323,7 +322,6 @@
323322
],
324323
default=1,
325324
)
326-
trigger_type = id
327325
panel.set_value("trigger_type", trigger_type)
328326

329327
if trigger_type == "1":
@@ -333,7 +331,9 @@
333331
)
334332
if trigger_type == "2":
335333
with st.container(border=True):
336-
source = st.selectbox("Source->", options=panel.get_value("trigger_sources", [""]))
334+
source = st.selectbox(
335+
"Source->", options=panel.get_value("available_trigger_sources", [""])
336+
)
337337
panel.set_value("digital_source", source)
338338
enum_selectbox(
339339
panel,
@@ -354,8 +354,7 @@
354354
)
355355
if trigger_type == "5":
356356
with st.container(border=True):
357-
analog_source = st.text_input("Source:", "APFI0")
358-
panel.set_value("analog_source", analog_source)
357+
analog_source = st.text_input("Source:", "APFI0", key="analog_source")
359358
enum_selectbox(
360359
panel,
361360
label="Slope",

0 commit comments

Comments
 (0)