Skip to content

Commit 2f9aa38

Browse files
author
Dilmi Wickramanayake
committed
lint errors
1 parent 58de63a commit 2f9aa38

File tree

1 file changed

+34
-37
lines changed

1 file changed

+34
-37
lines changed

examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage_panel.py

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@
3636
)
3737

3838

39-
4039
with left_col:
4140
with st.container(border=True):
4241
is_running = panel.get_value("is_running", True)
4342
if is_running:
44-
st.button(r"⏹️ Stop", key="stop_button")
43+
st.button("Stop", key="stop_button")
4544
elif not is_running and panel.get_value("daq_error", "") == "":
46-
run_button = st.button(r"▶️ Run", key="run_button")
45+
run_button = st.button("Run", key="run_button")
4746
else:
4847
st.error(
4948
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', '')}"
@@ -129,39 +128,39 @@
129128

130129
with right_col:
131130
with st.container(border=True):
132-
st.title("Output")
133-
acquired_data = panel.get_value("data", [0.0])
134-
sample_rate = panel.get_value("sample_rate", 1000.0)
135-
acquired_data_graph = {
136-
"animation": False,
137-
"tooltip": {"trigger": "axis"},
138-
"legend": {"data": ["Voltage (V)"]},
139-
"xAxis": {
140-
"type": "category",
141-
"data": [x / sample_rate for x in range(len(acquired_data))],
142-
"name": "Time",
143-
"nameLocation": "center",
144-
"nameGap": 40,
145-
},
146-
"yAxis": {
147-
"type": "value",
148-
"name": "Amplitude",
149-
"nameRotate": 90,
150-
"nameLocation": "center",
151-
"nameGap": 40,
131+
st.title("Output")
132+
acquired_data = panel.get_value("data", [0.0])
133+
sample_rate = panel.get_value("sample_rate", 1000.0)
134+
acquired_data_graph = {
135+
"animation": False,
136+
"tooltip": {"trigger": "axis"},
137+
"legend": {"data": ["Voltage (V)"]},
138+
"xAxis": {
139+
"type": "category",
140+
"data": [x / sample_rate for x in range(len(acquired_data))],
141+
"name": "Time",
142+
"nameLocation": "center",
143+
"nameGap": 40,
144+
},
145+
"yAxis": {
146+
"type": "value",
147+
"name": "Amplitude",
148+
"nameRotate": 90,
149+
"nameLocation": "center",
150+
"nameGap": 40,
151+
},
152+
"series": [
153+
{
154+
"name": "voltage_amplitude",
155+
"type": "line",
156+
"data": acquired_data,
157+
"emphasis": {"focus": "series"},
158+
"smooth": True,
159+
"seriesLayoutBy": "row",
152160
},
153-
"series": [
154-
{
155-
"name": "voltage_amplitude",
156-
"type": "line",
157-
"data": acquired_data,
158-
"emphasis": {"focus": "series"},
159-
"smooth": True,
160-
"seriesLayoutBy": "row",
161-
},
162-
],
163-
}
164-
st_echarts(options=acquired_data_graph, height="400px", key="graph", width="100%")
161+
],
162+
}
163+
st_echarts(options=acquired_data_graph, height="400px", key="graph", width="100%")
165164

166165
with st.container(border=True):
167166
st.title("Trigger Settings")
@@ -197,5 +196,3 @@
197196
st.write(
198197
"This trigger type is not supported in continuous sample timing. Refer to your device documentation for more information on which triggers are supported."
199198
)
200-
201-

0 commit comments

Comments
 (0)