File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed 
examples/nidaqmx/nidaqmx_analog_input_filtering Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 3939            available_trigger_sources .append (term )
4040panel .set_value ("available_trigger_sources" , available_trigger_sources )
4141try :
42+     panel .set_value ("daq_error" , "" )
4243    print (f"Panel URL: { panel .panel_url }  )
4344    print (f"Waiting for the 'Run' button to be pressed..." )
4445    print (f"(Press Ctrl + C to quit)" )
129130                )
130131
131132            try :
132-                 panel .set_value ("daq_error" , "" )
133133                task .start ()
134134                panel .set_value ("is_running" , True )
135135
Original file line number Diff line number Diff line change 77    CurrentUnits ,
88    Edge ,
99    FilterResponse ,
10-     LoggingMode ,
1110    Slope ,
1211    StrainGageBridgeType ,
1312    TerminalConfiguration ,
4645)
4746
4847
48+ def  hide_buttons ():
49+     st .markdown (
50+         """ 
51+         <style> 
52+         button[data-testid="stBaseButton-secondary"] { 
53+             display: none; 
54+         } 
55+         </style> 
56+         """ ,
57+         unsafe_allow_html = True ,
58+     )
59+ 
60+ 
4961with  left_col :
5062    with  st .container (border = True ):
5163        is_running  =  panel .get_value ("is_running" , True )
5264        if  is_running :
5365            st .button ("Stop" , key = "stop_button" )
5466        else :
55-             st .button ("Run" , key = "run_button" )
67+             run_button   =   st .button ("Run" , key = "run_button" )
5668        if  panel .get_value ("daq_error" , "" ) ==  "" :
5769            pass 
5870        else :
59-             st .error (panel .get_value ("daq_error" , "" ))
71+             hide_buttons ()
72+             st .error (panel .get_value ("daq_error" , "" ) +  " Please re-run script" )
6073
6174        st .title ("Channel Settings" )
6275        physical_channel  =  st .selectbox (
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments