|
38 | 38 | is_running = panel.get_value("is_running", False) |
39 | 39 |
|
40 | 40 | if is_running: |
41 | | - st.button(r"⏹️ $\large{\textbf{Stop}}$", key="stop_button") |
| 41 | + st.button(r"⏹️ Stop", key="stop_button") |
42 | 42 | else: |
43 | | - st.button(r"▶️ $\large{\textbf{Run}}$", key="run_button") |
| 43 | + st.button(r"▶️ Run", key="run_button") |
44 | 44 |
|
45 | 45 | thermocouple_data = panel.get_value("thermocouple_data", [0.0]) |
46 | 46 | voltage_data = panel.get_value("voltage_data", [0.0]) |
47 | 47 | sample_rate = panel.get_value("sample_rate", 0.0) |
48 | 48 |
|
49 | 49 | # Create two-column layout for the entire interface |
50 | | -left_col, right_col = st.columns([1, 1]) |
| 50 | +left_column, right_column = st.columns([1, 1]) |
51 | 51 |
|
52 | 52 | # Left column - Channel tabs and Timing Settings |
53 | | -with left_col: |
| 53 | +with left_column: |
54 | 54 | # Channel Settings tabs |
55 | 55 | with st.container(border=True): |
56 | 56 | st.header("Channel Settings") |
57 | 57 | voltage_tab, thermocouple_tab = st.tabs(["Voltage", "Thermocouple"]) |
58 | 58 |
|
59 | 59 | voltage_tab.header("Voltage") |
60 | 60 | with voltage_tab: |
61 | | - channel_left, channel_right = st.columns(2) |
62 | | - with channel_left: |
| 61 | + channel_left_column, channel_right_column = st.columns(2) |
| 62 | + with channel_left_column: |
63 | 63 | st.selectbox(options=["Dev1/ai0"], label="Physical Channels", disabled=True) |
64 | 64 | st.number_input( |
65 | 65 | "Min Value", |
|
75 | 75 | disabled=panel.get_value("is_running", False), |
76 | 76 | key="voltage_max_value", |
77 | 77 | ) |
78 | | - with channel_right: |
| 78 | + with channel_right_column: |
79 | 79 | ni.enum_selectbox( |
80 | 80 | panel, |
81 | 81 | label="Terminal Configuration", |
|
86 | 86 |
|
87 | 87 | thermocouple_tab.header("Thermocouple") |
88 | 88 | with thermocouple_tab: |
89 | | - channel_left, channel_middle, channel_right = st.columns(3) |
90 | | - with channel_left: |
| 89 | + channel_left_column, channel_middle_column, channel_right_column = st.columns(3) |
| 90 | + with channel_left_column: |
91 | 91 | st.selectbox(options=["Dev1/ai1"], label="Physical Channel", disabled=True) |
92 | 92 | st.number_input( |
93 | 93 | "Min Value", |
|
103 | 103 | disabled=panel.get_value("is_running", False), |
104 | 104 | key="thermocouple_max_value", |
105 | 105 | ) |
106 | | - with channel_middle: |
| 106 | + with channel_middle_column: |
107 | 107 | ni.enum_selectbox( |
108 | 108 | panel, |
109 | 109 | label="Units", |
|
118 | 118 | disabled=panel.get_value("is_running", False), |
119 | 119 | key="thermocouple_type", |
120 | 120 | ) |
121 | | - with channel_right: |
| 121 | + with channel_right_column: |
122 | 122 | ni.enum_selectbox( |
123 | 123 | panel, |
124 | 124 | label="CJC Source", |
|
137 | 137 | # Timing Settings section in left column |
138 | 138 | with st.container(border=True): |
139 | 139 | st.header("Timing Settings") |
140 | | - timing_left, timing_right = st.columns(2) |
141 | | - with timing_left: |
| 140 | + timing_left_column, timing_right_column = st.columns(2) |
| 141 | + with timing_left_column: |
142 | 142 | st.selectbox( |
143 | 143 | options=["OnboardClock"], |
144 | 144 | label="Sample Clock Source", |
|
152 | 152 | disabled=panel.get_value("is_running", False), |
153 | 153 | key="sample_rate_input", |
154 | 154 | ) |
155 | | - with timing_right: |
| 155 | + with timing_right_column: |
156 | 156 | st.number_input( |
157 | 157 | "Samples per Loop", |
158 | 158 | value=3000, |
|
168 | 168 | ) |
169 | 169 |
|
170 | 170 | # Right column - Graph and Logging Settings |
171 | | -with right_col: |
| 171 | +with right_column: |
172 | 172 | with st.container(border=True): |
173 | 173 | # Graph section |
174 | 174 | st.header("Voltage & Thermocouple") |
|
217 | 217 | # Logging Settings section in right column |
218 | 218 | with st.container(border=True): |
219 | 219 | st.header("Logging Settings") |
220 | | - logging_left, logging_right = st.columns(2) |
221 | | - with logging_left: |
| 220 | + logging_left_column, logging_right_column = st.columns(2) |
| 221 | + with logging_left_column: |
222 | 222 | ni.enum_selectbox( |
223 | 223 | panel, |
224 | 224 | label="Logging Mode", |
225 | 225 | value=LoggingMode.OFF, |
226 | 226 | disabled=panel.get_value("is_running", False), |
227 | 227 | key="logging_mode", |
228 | 228 | ) |
229 | | - with logging_right: |
230 | | - col1, col2 = st.columns([3, 1]) |
231 | | - with col1: |
| 229 | + with logging_right_column: |
| 230 | + left_sub_column, right_sub_column = st.columns([3, 1]) |
| 231 | + with left_sub_column: |
232 | 232 | tdms_file_path = st.text_input( |
233 | 233 | label="TDMS File Path", |
234 | 234 | disabled=panel.get_value("is_running", False), |
|
0 commit comments