|  | 
| 152 | 152 | 
 | 
| 153 | 153 | with right_col: | 
| 154 | 154 |     st.title("Task Types") | 
| 155 |  | -    chosen_id = stx.tab_bar( | 
|  | 155 | +    chan_type = stx.tab_bar( | 
| 156 | 156 |         data=[ | 
| 157 | 157 |             stx.TabBarItemData(id=1, title="Voltage", description=""), | 
| 158 | 158 |             stx.TabBarItemData(id=2, title="Current", description=""), | 
|  | 
| 161 | 161 |         default=1, | 
| 162 | 162 |     ) | 
| 163 | 163 | 
 | 
| 164 |  | -    chan_type = chosen_id | 
| 165 | 164 |     panel.set_value("chan_type", chan_type) | 
| 166 | 165 | 
 | 
| 167 |  | -    if chosen_id == "1": | 
|  | 166 | +    if chan_type == "1": | 
| 168 | 167 |         with st.container(border=True): | 
| 169 | 168 |             st.title("Voltage Data") | 
| 170 | 169 |             channel_left, channel_right = st.columns(2) | 
|  | 
| 185 | 184 |                     key="min_value_voltage", | 
| 186 | 185 |                 ) | 
| 187 | 186 | 
 | 
| 188 |  | -    if chosen_id == "2": | 
|  | 187 | +    if chan_type == "2": | 
| 189 | 188 |         with st.container(border=True): | 
| 190 | 189 |             st.title("Current Data") | 
| 191 | 190 |             channel_left, channel_right = st.columns(2) | 
|  | 
| 224 | 223 |                         step=1.0, | 
| 225 | 224 |                         disabled=panel.get_value("is_running", False), | 
| 226 | 225 |                     ) | 
| 227 |  | -    if chosen_id == "3": | 
|  | 226 | +    if chan_type == "3": | 
| 228 | 227 |         with st.container(border=True): | 
| 229 | 228 |             st.title("Strain Gage Data") | 
| 230 | 229 |             channel_left, channel_right = st.columns(2) | 
|  | 
| 311 | 310 |                     ) | 
| 312 | 311 | 
 | 
| 313 | 312 |     st.title("Trigger Settings") | 
| 314 |  | -    id = stx.tab_bar( | 
|  | 313 | +    trigger_type = stx.tab_bar( | 
| 315 | 314 |         data=[ | 
| 316 | 315 |             stx.TabBarItemData(id=1, title="No Trigger", description=""), | 
| 317 | 316 |             stx.TabBarItemData(id=2, title="Digital Start", description=""), | 
|  | 
| 323 | 322 |         ], | 
| 324 | 323 |         default=1, | 
| 325 | 324 |     ) | 
| 326 |  | -    trigger_type = id | 
| 327 | 325 |     panel.set_value("trigger_type", trigger_type) | 
| 328 | 326 | 
 | 
| 329 | 327 |     if trigger_type == "1": | 
|  | 
| 333 | 331 |             ) | 
| 334 | 332 |     if trigger_type == "2": | 
| 335 | 333 |         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 | +            ) | 
| 337 | 337 |             panel.set_value("digital_source", source) | 
| 338 | 338 |             enum_selectbox( | 
| 339 | 339 |                 panel, | 
|  | 
| 354 | 354 |             ) | 
| 355 | 355 |     if trigger_type == "5": | 
| 356 | 356 |         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") | 
| 359 | 358 |             enum_selectbox( | 
| 360 | 359 |                 panel, | 
| 361 | 360 |                 label="Slope", | 
|  | 
0 commit comments