Commit 0d78d42e authored by Andrey Filippov's avatar Andrey Filippov

porting nc353 php files

parent df39fd1f
TARGETDIR=$(DESTDIR)/www/pages
all: # Runs 'make', 'make install', and 'make clean' in specified subdirectories
@echo "make all" SUBDIRS := src/php_top # src1
INSTALLDIRS = $(SUBDIRS:%=install-%)
install: CLEANDIRS = $(SUBDIRS:%=clean-%)
@echo "make install"
#TARGETDIR=$(DESTDIR)/www/pages
clean:
@echo "make clean" all: $(SUBDIRS)
@echo "make all top"
$(SUBDIRS):
$(MAKE) -C $@
install: $(INSTALLDIRS)
@echo "make install top"
$(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
clean: $(CLEANDIRS)
@echo "make clean top"
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
.PHONY: all install clean $(SUBDIRS) $(INSTALLDIRS) $(CLEANDIRS)
#!/bin/bash
args="$@"
while (( "$#" )); do
shift
done
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Launching bitbake $args"
cd $DIR/../../poky
. ./oe-init-build-env
bitbake $args | sed -u 's@| @@'
exit 0
DOCUMENTROOT=$(DESTDIR)/www/pages
OWN = -o root -g root
INSTDOCS = 0644
INSTALL = install
DOCS= favicon.ico \
robots.txt
PHP_SCRIPTS=camvars.php \
ccam.php \
diag_utils.php \
framepars.php \
parsedit.php \
phpinfo.php
all:
@echo "make all in src"
install:
@echo "make install in src"
$(INSTALL) $(OWN) -d $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHP_SCRIPTS) $(DOCUMENTROOT)
clean:
@echo "make clean in src"
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
OWN = -o root -g root
ROOT = $(prefix)
DOCUMENTROOT = $(prefix)/usr/html
ATTICROOT = $(prefix)/usr/html/attic
INCLUDES = $(prefix)/usr/html/includes
INSTDOCS = 0644
INSTEXE = 0755
DOCS= LICENSE
PHPSHELL= phpshell.php \
phpshell.css \
valid-xhtml10.png \
vcss.png
HTMLFILES= 10364.html \
focus.html \
robots.txt
##ATTICFILES - files that are not ported (or even needed with 8.x software)
ATTICFILES= camera_demo.php \
compressor.php \
demo_focus.php \
init354.php \
senspars.php \
ccam.php \
framepars.php \
syncmaster354.php \
syncslave354.php \
whitebalance.php \
demo_aexp.php \
camvars.php \
jhead.php
PHPSCRIPTS= 10364.php \
103641.php \
103697.php \
coring_filter_setup.php \
fpga.php \
diag_utils.php \
focus.php \
init347.php \
webcam.php \
mshutter.php \
mjpeg.php \
raw.php \
raw_demo.php \
webcam_adv.php \
parsedit.php \
phpinfo.php \
power347.php \
readparameter_demo.php \
setparameters_demo.php \
snapfull.php \
sync.php \
sync_other2this.php \
trig.php \
i2c.php \
paramtool.php \
tuneseq.php \
launcher.php \
index.php
PHPEXE= bdetect.php \
usb10369a.php \
detect_ioboard.php
PHPINCLUDES=i2c.inc show_source.inc
all:
install:
$(INSTALL) $(OWN) -d $(DOCUMENTROOT)
$(INSTALL) $(OWN) -d $(INCLUDES)
$(INSTALL) $(OWN) -d $(ATTICROOT)
#install files
tar -xzf phpshell.tar.gz
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHPSHELL) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHPSCRIPTS) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTEXE) $(PHPEXE) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHPINCLUDES) $(INCLUDES)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(HTMLFILES) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(ROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(ATTICFILES) $(ATTICROOT)
<?php
/*!*******************************************************************************
*! FILE NAME : camvars.php
*! DESCRIPTION: read/write camera internal variables by name
*! Copyright (C) 2008 Elphel, Inc
*! -----------------------------------------------------------------------------**
*!
*! This program is free software: you can redistribute it and/or modify
*! it under the terms of the GNU General Public License as published by
*! the Free Software Foundation, either version 3 of the License, or
*! (at your option) any later version.
*!
*! This program is distributed in the hope that it will be useful,
*! but WITHOUT ANY WARRANTY; without even the implied warranty of
*! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*! GNU General Public License for more details.
*!
*! You should have received a copy of the GNU General Public License
*! along with this program. If not, see <http://www.gnu.org/licenses/>.
*! -----------------------------------------------------------------------------**
*! $Log: camvars.php,v $
*! Revision 1.1.1.1 2008/11/27 20:04:03 elphel
*!
*!
*! Revision 1.2 2008/11/22 05:58:24 elphel
*! modifying to match elphel_set_P_value()
*!
*! Revision 1.2 2008/04/17 22:37:57 elphel
*! bug fix
*!
*! Revision 1.1 2008/03/22 04:41:07 elphel
*! Script to set/get camera parameters with HTTP GET (result as XML)
*!
*!
*/
if (count($_GET)==0) {
echo <<<USAGE
<p>This script returns camera variables as XML file, it also allows you to set those variables. Usually those changes will not take effect immediately - please use ccam.php that both changes variables and programs the camera to use them.</p>
<p>The variable names to be read are specified without values (like camvar.php?WOI_WIDTH&WOI_HEIGHT ), the ones to be written - with the values (camvar.php?QUALITY=75). It is also possible to mix both types in the same request.</p>
USAGE;
exit (0);
}
$toRead=array();
$toWrite=array();
foreach($_GET as $key=>$value) {
if ($value==="") $toRead[$key]=$value;
else $toWrite[$key]=(integer) $value;
}
$npars=(count($toWrite)>0)?elphel_set_P_arr($toWrite):0;
if (count($toRead)>0) $toRead=elphel_get_P_arr($toRead);
if ($_GET["STATE"]!==NULL) $toRead["STATE"]=elphel_get_state();
$xml = new SimpleXMLElement("<?xml version='1.0' standalone='yes'?><camvars/>");
foreach ($toRead as $key=>$value) {
$xml->addChild ($key,$value);
}
if (count($toWrite)>0) {
$xml->addChild ('frame',$npars);
}
$rslt=$xml->asXML();
header("Content-Type: text/xml");
header("Content-Length: ".strlen($rslt)."\n");
header("Pragma: no-cache\n");
printf($rslt);
?>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
phpinfo();
?>
User-agent: *
Noindex: /
Disallow: /
Allow: /camvc.html
Allow: /webcam.php
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment