Skip to content

Commit 2f569a8

Browse files
author
Dilmi Wickramanayake
committed
fix changes to filtering
2 parents 82c2b7f + ffca8c1 commit 2f569a8

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

examples/nidaqmx_analog_input_filtering/nidaqmx_analog_input_filtering.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# How to use nidaqmx: https://nidaqmx-python.readthedocs.io/en/stable/
3636
with nidaqmx.Task() as task:
3737
chan_type = panel.get_value("chan_type", "1")
38-
38+
3939
if chan_type == "2":
4040
chan = task.ai_channels.add_ai_current_chan(
4141
"Mod3/ai10",
@@ -81,19 +81,19 @@
8181
)
8282
panel.set_value("actual_sample_rate", task._timing.samp_clk_rate)
8383
panel.set_value("sample_rate", panel.get_value("rate", 100.0))
84-
84+
8585
task.in_stream.configure_logging(
8686
file_path=panel.get_value("tdms_file_path", "data.tdms"),
8787
logging_mode=panel.get_value("logging_mode", LoggingMode.OFF),
8888
operation=LoggingOperation.OPEN_OR_CREATE,
8989
)
90-
if panel.get_value("filter","Filter") == "Filter":
90+
if panel.get_value("filter", "Filter") == "Filter":
9191
chan.ai_filter_enable = True
9292
chan.ai_filter_freq = panel.get_value("filter_freq", 0.0)
9393
chan.ai_filter_response = panel.get_value("filter_response", FilterResponse.COMB)
9494
chan.ai_filter_order = panel.get_value("filter_order", 1)
9595
# Not all hardware supports all filter types.
96-
# Refer to your device documentation for more information.
96+
# Refer to your device documentation for more information.
9797
panel.set_value("actual_filter_freq", chan.ai_filter_freq)
9898
panel.set_value("actual_filter_response", chan.ai_filter_response)
9999
panel.set_value("actual_filter_order", chan.ai_filter_order)

examples/nidaqmx_analog_input_filtering/nidaqmx_analog_input_filtering_panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
value= panel.get_value("actual_sample_rate", 1000.0),
247247
key = "actual_sample_rate",
248248
step = 1.0,
249-
disabled=True
249+
disabled= True
250250
)
251251

252252
st.title("Logging Settings")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ optional = true
6464

6565
[tool.poetry.group.examples.dependencies]
6666
streamlit-echarts = ">=0.4.0"
67+
extra-streamlit-components = "^0.1.80"
6768
nidaqmx = { version = ">=0.8.0", allow-prereleases = true }
6869
niscope = "^1.4.9"
6970

0 commit comments

Comments
 (0)