Skip to content

Commit 16cdcc5

Browse files
author
Dilmi Wickramanayake
committed
run button change
1 parent 14db8ff commit 16cdcc5

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

examples/nidaqmx/nidaqmx_analog_output_voltage/nidaqmx_analog_output_voltage_panel.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ def hide_run_button() -> None:
5454
with st.container(border=True):
5555
is_running = panel.get_value("is_running", True)
5656
if is_running:
57-
st.button("Stop", key="stop_button")
57+
st.button(r"⏹️ Stop", key="stop_button")
58+
elif not is_running and panel.get_value("daq_error", "") == "":
59+
run_button = st.button(r"▶️ Run", key="run_button")
5860
else:
59-
st.button("Run", key="run_button")
60-
61-
if panel.get_value("daq_error", "") == "":
62-
pass
63-
else:
64-
hide_run_button()
65-
st.error(panel.get_value("daq_error", "") + " Please re-run script")
61+
st.error(
62+
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', '')}"
63+
)
6664

6765
st.title("Channel Settings")
6866
physical_channel = st.selectbox(

0 commit comments

Comments
 (0)