You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
			
		
		
		
		
			
		
			
				
	
	
		
			58 lines
		
	
	
		
			1010 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			58 lines
		
	
	
		
			1010 B
		
	
	
	
		
			JavaScript
		
	
| function AinCallback(o)
 | |
| {
 | |
|   var pin = o.ain_p;
 | |
|   $('txtain_v'+pin).value = o.ain_v;
 | |
|   AinDrawgraph(o);
 | |
| }
 | |
| function getAin(o)
 | |
| {
 | |
|   var p = o.attributes['pin'].value;
 | |
|   var oUpdate;
 | |
|   setTimeout(function()
 | |
|     {
 | |
|       oUpdate = new AJAX('get_ain'+p+'.cgi',
 | |
|       function(t)
 | |
|         {
 | |
|           try
 | |
|           {
 | |
|             eval(t);
 | |
|           }
 | |
|           catch(e)
 | |
|           {
 | |
|             alert(e);
 | |
|           }
 | |
|         }
 | |
|       );
 | |
|       oUpdate.doGet();
 | |
|     }
 | |
|     , 300);
 | |
| }
 | |
| function AinDrawgraph(o)
 | |
| {
 | |
|   var pin = o.ain_p;
 | |
|   var val = o.ain_v;
 | |
|   $('ain_v'+pin).style.width = val*500/1023+'px';
 | |
| }
 | |
| function getAin6_update()
 | |
| {
 | |
|   var oUpdate;
 | |
|   setTimeout(function()
 | |
|     {
 | |
|       oUpdate = new AJAX('get_ain6.cgi',
 | |
|       function(t)
 | |
|         {
 | |
|           try
 | |
|           {
 | |
|             eval(t);
 | |
|           }
 | |
|           catch(e)
 | |
|           {
 | |
|             alert(e);
 | |
|           }
 | |
|         }
 | |
|       );
 | |
|       oUpdate.doGet();
 | |
|     }
 | |
|     , 300); setTimeout('getAin6_update()', 500);
 | |
| }
 |