log_error("Invalid camera state:".$GLOBALS['camera_state_arr']['state'].", valid states are:\n".print_r(array_keys($GLOBALS['STOP_AFTER']),1));
respond_xml($GLOBALS['camera_state_arr']['state']," Invalid state, valid are: ".implode(',',array_keys($GLOBALS['STOP_AFTER'])));// will exit with error
}
}
log_msg("Processing camera state: ".$GLOBALS['camera_state_arr']['state']);
log_msg("Processing camera state: ".$GLOBALS['camera_state_arr']['state']);
* #define AUTOCAMPARS_CMD_RESTORE 1 /// restore specified groups of parameters from the specified page
* #define AUTOCAMPARS_CMD_RESTORE 1 /// restore specified groups of parameters from the specified page
* #define AUTOCAMPARS_CMD_SAVE 2 /// save all current parameters to the specified group (page 0 is write-protected)
* #define AUTOCAMPARS_CMD_SAVE 2 /// save all current parameters to the specified group (page 0 is write-protected)
* #define AUTOCAMPARS_CMD_DFLT 3 /// make selected page the default one (used at startup), page 0 OK
* #define AUTOCAMPARS_CMD_DFLT 3 /// make selected page the default one (used at startup), page 0 OK
* #define AUTOCAMPARS_CMD_SAVEDFLT 4 /// save all current parameters to the specified group (page 0 is write-protected) and make it default (used at startup)
* #define AUTOCAMPARS_CMD_SAVEDFLT 4 /// save all current parameters to the specified group (page 0 is write-protected) and make it default (used at startup)
* #define AUTOCAMPARS_CMD_INIT 5 /// reset sensor/sequencers, restore all parameters from the specified page
* #define AUTOCAMPARS_CMD_INIT 5 /// reset sensor/sequencers, restore all parameters from the specified page
*/
*/
// / Even as sync happens simultaneously, frame sync is not - it depends on exposure time.
// / So we need to disable autoexposure and set minimal exposure on this camera, restore on exit
// elphel_set_P_value($GLOBALS['sensor_port'],ELPHEL_SENSOR, 0x00, 0, ELPHEL_CONST_FRAMEPAIR_FORCE_NEWPROC);/// set sensor to 0 will start detection
}
elphel_set_P_value($GLOBALS['sensor_port'],ELPHEL_SENSOR,0x00,elphel_get_frame($GLOBALS['sensor_port']),ELPHEL_CONST_FRAMEPAIR_FORCE_NEWPROC);// / set sensor to 0 will start detection
fseek($framepars_file,ELPHEL_LSEEK_SENSORPROC,SEEK_END);// / In case the autoprocessing after parameter write will be disabled in the future
functionoffset_IP($offset){
// / (normally parameters are processed at frame sync interrupts - not yet available)
$aIP=explode('.',my_IP());
fclose($framepars_file);
$aIP[3]=(string)($offset+((int)$aIP[3]));
// / Sensor should be up and running. let's wait for up to $maxWait seconds
if(($mask&$parMask)&&array_key_exists($par,$GLOBALS['configs'][$port]['paramSets'][$page])&&(!$GLOBALS['configs'][$port]['parTypes'][$par]))// / not 'text'