apps/sctl/imconf_load.php

Go to the documentation of this file.
00001 <?php
00002 $CONF=$_GET['conf'];
00003 if($CONF == "")
00004         $CONF="/etc/image_settings.conf";
00005 $inits=parse_ini_file($CONF);
00006 $init_pars=array();
00007 reset($inits);
00008 while(list($key, $value) = each($inits)) {
00009         $init_pars[$key] = (int)$value;
00010 }
00011 
00012 // Start with reset (normally not needed, just to make sure we have a clean start, not relying on previous programming)
00013 if(elphel_get_state() > 7) {  
00014         elphel_compressor_stop(); 
00015         while(elphel_get_state() > 7) ; 
00016         elphel_compressor_reset(); 
00017         elphel_compressor_reset(); 
00018 }
00019 elphel_reset_sensor();
00020 elphel_set_P_arr($init_pars);
00021 // Program sensor (with restart)
00022 elphel_program_sensor (0);
00023 //  echo "Parameters after programmimg:\n";
00024 //  print_r(elphel_get_P_arr($init_pars));
00025 // start compressor:
00026 elphel_compressor_run();
00027 elphel_wait_frame();
00028 elphel_set_P_arr($init_pars);
00029 elphel_wait_frame();
00030 // or just acquire a single frame
00031 //  elphel_compressor_frame();
00032 ?> 

Generated on Thu Aug 7 16:18:59 2008 for elphel by  doxygen 1.5.1