log_error("Invalid camera state:".$camera_state.", valid states are:\n".print_r($GLOBALS['STATES'],1));
log_error("Invalid camera state:".$GLOBALS['camera_state_arr']['state'].", valid states are:\n".print_r(array_keys($GLOBALS['STOP_AFTER']),1));
}
}
log_msg("Processing camera state: ".$GLOBALS['camera_state']);
log_msg("Processing camera state: ".$GLOBALS['camera_state_arr']['state']);
get_sysfs_sensors();
get_sysfs_sensors();
$GLOBALS['useDefaultPageNumber']=15;
$GLOBALS['useDefaultPageNumber']=15;
$GLOBALS['protectedPage']=0;// / change to -1 to enable saving to page 0
$GLOBALS['protectedPage']=0;// / change to -1 to enable saving to page 0
///$needDetection = (elphel_get_P_value ( $GLOBALS ['sensor_port'], ELPHEL_SENSOR ) <= 0); // / we need sensor detection to be started before we can read 10359 eeprom and so select default parameters
///$needDetection = (elphel_get_P_value ( $GLOBALS ['sensor_port'], ELPHEL_SENSOR ) <= 0); // / we need sensor detection to be started before we can read 10359 eeprom and so select default parameters
@@ -846,17 +1061,42 @@ function get_mt9p006_mode() {
...
@@ -846,17 +1061,42 @@ function get_mt9p006_mode() {
// var_dump($csa);
// var_dump($csa);
if($csa['application']=='MT9P006'){
if($csa['application']=='MT9P006'){
$mode=intval($csa['mode']);
$mode=intval($csa['mode']);
$GLOBALS['mt9p006_mode']=$mode;
$GLOBALS['STOP_AFTER']=array(
'BOOT'=>false,
'POWERED'=>false,
'BITSTREAM'=>false,
'SENSORS_DETECTED'=>false,
'SENSORS_SYNCHRONIZED'=>false,
'PARAMETERS_PRESET'=>false,
'SEQUENCERS_ADVANCED'=>false,
'INITIALIZED'=>false);
return$mode;
return$mode;
}
}
unset($GLOBALS['mt9p006_mode']);
return0;
return0;
}
}
functionget_eyesis_mode(){
functionget_eyesis_mode(){
$csa=get_application_mode();
$csa=get_application_mode();
// var_dump($csa);
// var_dump($csa);
if($csa['application']=='EYESIS'){
if($csa['application']=='EYESIS'){
$eyesis_mode=intval($csa['mode']);
$eyesis_mode=intval($csa['mode']);
$GLOBALS['eyesis_mode']=$eyesis_mode;
$GLOBALS['STOP_AFTER']=array(
'BOOT'=>true,
'POWERED'=>true,
'BITSTREAM'=>true,
'SENSORS_DETECTED'=>true,
'SENSORS_SYNCHRONIZED'=>true,
'PARAMETERS_PRESET'=>true,
'SEQUENCERS_ADVANCED'=>true,
'INITIALIZED'=>true);
return$eyesis_mode;
return$eyesis_mode;
}
}
unset($GLOBALS['eyesis_mode']);
return0;
return0;
}
}
...
@@ -908,26 +1148,13 @@ function processInit($initPage, $needDetection = true) {
...
@@ -908,26 +1148,13 @@ function processInit($initPage, $needDetection = true) {
usleep($waitDaemons*1000000);
usleep($waitDaemons*1000000);
log_msg("Current frame on master port =".elphel_get_frame($GLOBALS['master_port']).", waking up, daemons should be dead already");
log_msg("Current frame on master port =".elphel_get_frame($GLOBALS['master_port']).", waking up, daemons should be dead already");
}
}
/*
if ($needDetection) {
if (! detectSensor ())
RETURN - 1;
}
*/
log_msg("after reset - current frame on master port =".elphel_get_frame($GLOBALS['master_port']));
log_msg("after reset - current frame on master port =".elphel_get_frame($GLOBALS['master_port']));
// $page=setParsFromPage($initPage,0xffffffff,true); /// all parameters, init mode - treat all parameters as new, even when they are the same as current (0)
if(($mask&$parMask)&&array_key_exists($par,$GLOBALS['configs'][$port]['paramSets'][$page])&&(!$GLOBALS['configs'][$port]['parTypes'][$par]))// / not 'text'
if(($mask&$parMask)&&array_key_exists($par,$GLOBALS['configs'][$port]['paramSets'][$page])&&(!$GLOBALS['configs'][$port]['parTypes'][$par]))// / not 'text'