Commit e773687b authored by Andrey Filippov's avatar Andrey Filippov

configured as Eclipse project

parent 3c834323
...@@ -10,3 +10,5 @@ generated* ...@@ -10,3 +10,5 @@ generated*
sysroots sysroots
bitbake-logs bitbake-logs
/temp/ /temp/
*.o
*.cgi
This diff is collapsed.
# Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src
INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS = $(SUBDIRS:%=clean-%)
#TARGETDIR=$(DESTDIR)/www/pages
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)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.1788776055">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1788776055" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" description="" id="0.1788776055" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="0.1788776055." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1299247356" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1299247356.1306458003" name=""/>
<builder arguments="web-camvc" command="${workspace_loc:/elphel-web-camvc/run_bitbake.sh}" enableCleanBuild="false" id="org.eclipse.cdt.build.core.settings.default.builder.321313473" incrementalBuildTarget="-c install -f -v" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.382067643" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.1135988409" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.302618452" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1261984734" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1373446415" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.839097784" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.946080580" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1651015067" name="LLVM bytecode assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1565334424" languageId="org.eclipse.cdt.managedbuilder.llvm.ui.llvmAssembly" languageName="LLVM bytecode assembly" sourceContentType="org.eclipse.cdt.managedbuilder.llvm.ui.llvmAssemblySource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1602304504" name="UPC" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1018834749" languageId="org.eclipse.cdt.core.parser.upc.upc" languageName="UPC" sourceContentType="org.eclipse.cdt.core.parser.upc.upcSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="elphel-web-camvc.null.475208222" name="elphel-web-camvc"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="0.1788776055">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/elphel-web-camvc"/>
</configuration>
</storageModule>
</cproject>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/elphel-web-camvc/run_bitbake.sh}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="web-camvc -c target_scp -f"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>elphel-web-camvc</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/SCP web-camvc to target.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
# -----------------------------------------------------------------------------** #set shell to bash, othewise $RANDOM may not work (with dash)
# packages/web/353/Makefile SHELL=/bin/bash
#
# Copyright (C) 2005-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: Makefile,v $
# Revision 1.5 2009/03/23 18:14:06 elphel
# making camvc.html as alias to camvc2.html
#
# Revision 1.4 2008/12/13 23:38:18 elphel
# split camvc2.html, - now only HTML code is in camvc2.html, all the javascript in in camvc_main.js, camvc_video.js and other files that were already separate
#
# Revision 1.3 2008/12/10 22:08:38 elphel
# make now removes temporary file camvc2.ts.html after usage to prevent KDevelop to use it in "find in files"
#
# Revision 1.2 2008/12/05 03:30:26 elphel
# Added camvc_circbuf.js to support circbuf/Exif , restoring functionality available in 7.1
#
# Revision 1.1.1.1 2008/11/27 20:04:03 elphel
#
#
# Revision 1.4 2008/11/17 06:48:04 elphel
# removed camvc2_ccam.js that was already not used
#
# Revision 1.3 2008/11/08 05:54:02 elphel
# snapshot - working on camvc
#
# Revision 1.2 2008/11/02 07:26:14 elphel
# 8.0.alpha11 - started to port ccam.php/camvc2.html
#
# Revision 1.3 2008/04/24 18:51:15 elphel
# added navigation through circbuf
#
# Revision 1.2 2008/04/22 22:21:31 elphel
# Started camvc2 that currently uses most of the same images and javascript files as camvc
#
# Revision 1.1.1.1 2007/09/19 04:51:17 elphel
# This is a fresh tree based on elphel353-2.10
#
# Revision 1.3 2007/09/19 04:51:17 elphel
# Upgraded license (header)
#
#
# Create directories for HTML pages # Create directories for HTML pages
#
AXIS_USABLE_LIBS = UCLIBC GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
# set root as owned and group owner for all files # set root as owned and group owner for all files
OWN = -o root -g root OWN = -o root -g root
DOCUMENTROOT = $(prefix)/mnt/flash/html DOCUMENTROOT=/www/pages
PRODROOT = ../../..
INSTDOCS = 0644 INSTDOCS = 0644
INSTPROG = 0755 INSTPROG = 0755
#DOCS = camvc.html
DOCS = elphelTabs.js camvcUpgrade.html \ DOCS = elphelTabs.js camvcUpgrade.html \
elphelFrames.js elphelContextHelp.js closeme.html camvc_configs.js camvc_dvr.js \ elphelFrames.js elphelContextHelp.js closeme.html camvc_configs.js camvc_dvr.js \
elphelSliders2.js camvc2_i18n.js elphelButtons2.js camvc_camcomm.js camvc_interface.js \ elphelSliders2.js camvc2_i18n.js elphelButtons2.js camvc_camcomm.js camvc_interface.js \
...@@ -96,7 +34,12 @@ IMGS = images/slider_ball_13x25.png images/slider_ball_13x25_disabled.png images ...@@ -96,7 +34,12 @@ IMGS = images/slider_ball_13x25.png images/slider_ball_13x25_disabled.png images
images/tooltips65x160.png images/bgmesh8x8.png images/elphel_logo256x256.png \ images/tooltips65x160.png images/bgmesh8x8.png images/elphel_logo256x256.png \
images/running_25x7.gif images/stopped_25x7.png images/recording_5x5.gif images/running_25x7.gif images/stopped_25x7.png images/recording_5x5.gif
IMGSRC = images/camvc_buttons.xcf images/tabs16x24.xcf IMGSRC = images/camvc_buttons.xcf images/tabs16x24.xcf
TIMESTAMP:=$(shell echo $$RANDOM) #TIMESTAMP:=$(shell echo $$RANDOM)
TIMESTAMP=$(shell echo $$RANDOM)
#should be before install - not to run make install during bitbake -c compile (permissions)
all:
@echo "make all in src"
install: install:
############################################################################################################ ############################################################################################################
# Replace links with randomized ones to prevent browser using cache for javascript/image files. # # Replace links with randomized ones to prevent browser using cache for javascript/image files. #
...@@ -109,15 +52,16 @@ install: ...@@ -109,15 +52,16 @@ install:
# sed -e 's/_TIMESTAMP_/$(TIMESTAMP)/' camvc.html >camvc.ts.html # sed -e 's/_TIMESTAMP_/$(TIMESTAMP)/' camvc.html >camvc.ts.html
sed -e 's/_TIMESTAMP_/$(TIMESTAMP)/' camvc2.html >camvc2.ts.html sed -e 's/_TIMESTAMP_/$(TIMESTAMP)/' camvc2.html >camvc2.ts.html
#prepare some directories anyway #prepare some directories anyway
$(INSTALL) $(OWN) -d $(DOCUMENTROOT)/images $(INSTALL) $(OWN) -d $(DESTDIR)$(DOCUMENTROOT)
$(INSTALL) $(OWN) -d $(DESTDIR)$(DOCUMENTROOT)/images
#install files #install files
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DOCUMENTROOT) $(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DESTDIR)$(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) camvc2.ts.html $(DOCUMENTROOT)/camvc2.html $(INSTALL) $(OWN) -m $(INSTDOCS) camvc2.ts.html $(DESTDIR)$(DOCUMENTROOT)/camvc2.html
ln -sf camvc2.html $(DOCUMENTROOT)/index.html # ln -sf camvc2.html $(DESTDIR)$(DOCUMENTROOT)/index.html
ln -sf camvc2.html $(DOCUMENTROOT)/camvc.html ln -sf camvc2.html $(DESTDIR)$(DOCUMENTROOT)/camvc.html
$(INSTALL) $(OWN) -m $(INSTDOCS) $(IMGS) $(DOCUMENTROOT)/images $(INSTALL) $(OWN) -m $(INSTDOCS) $(IMGS) $(DESTDIR)$(DOCUMENTROOT)/images
$(INSTALL) $(OWN) -m $(INSTDOCS) $(IMGSRC) $(DOCUMENTROOT)/images $(INSTALL) $(OWN) -m $(INSTDOCS) $(IMGSRC) $(DESTDIR)$(DOCUMENTROOT)/images
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHPSCRIPTS) $(DOCUMENTROOT) $(INSTALL) $(OWN) -m $(INSTDOCS) $(PHPSCRIPTS) $(DESTDIR)$(DOCUMENTROOT)
rm -f camvc2.ts.html rm -f camvc2.ts.html
clean: clean:
rm -f *.bak ~* rm -f *.bak ~*
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/*!******************************************************************************* /*!*******************************************************************************
*! FILE NAME : camvc.php *! FILE NAME : camvc.php
*! DESCRIPTION: PHP companion of camvc *! DESCRIPTION: PHP companion of camvc
*! Copyright (C) 2008 Elphel, Inc *! Copyright (C) 2008-2016 Elphel, Inc
*! -----------------------------------------------------------------------------** *! -----------------------------------------------------------------------------**
*! *!
*! This program is free software: you can redistribute it and/or modify *! This program is free software: you can redistribute it and/or modify
...@@ -177,10 +177,10 @@ function prepSetNative() { ...@@ -177,10 +177,10 @@ function prepSetNative() {
} }
function applySetNative($ahead) { function applySetNative($ahead) {
global $set,$setNative,$pgmFrameNumber; global $set,$setNative,$pgmFrameNumber;
$pgmFrameNumber=elphel_get_frame()+$ahead; $pgmFrameNumber=elphel_get_frame($GLOBALS['sensor_port'])+$ahead;
///NOTE: no verification (and no waiting) that the trget frame is not too far in the future ///NOTE: no verification (and no waiting) that the trget frame is not too far in the future
foreach ($setNative as $since=>$pgmpars) { foreach ($setNative as $since=>$pgmpars) {
elphel_set_P_arr ($pgmpars, $pgmFrameNumber+$since); elphel_set_P_arr($GLOBALS['sensor_port'],$pgmpars, $pgmFrameNumber+$since);
} }
} }
...@@ -208,7 +208,7 @@ function addGammas() { ...@@ -208,7 +208,7 @@ function addGammas() {
foreach ($gammas as $gamma_black=>$whatever) { foreach ($gammas as $gamma_black=>$whatever) {
$black=($gamma_black>>8) & 0xff; $black=($gamma_black>>8) & 0xff;
$gamma=($gamma_black & 0xff)*0.01; $gamma=($gamma_black & 0xff)*0.01;
elphel_gamma_add ($gamma, $black); elphel_gamma_add($gamma, $black);
} }
} }
...@@ -312,6 +312,18 @@ function decodeGet ($encoded_get) { ...@@ -312,6 +312,18 @@ function decodeGet ($encoded_get) {
} }
///main() ///main()
$MAX_EXECUTION_TIME=20; $MAX_EXECUTION_TIME=20;
$GLOBALS['sensor_port']=0;
if ($_GET['sensor_port']!=NULL){
$GLOBALS['sensor_port'] = myval($_GET['sensor_port']);
}
$GLOBALS['subcahannel']=0; // TODO NC393: handle! It applies to multiplexer mode, gammas, histograms and focus
// Initially it all will be 0 (common) as it was in 353
if ($_GET['subcahannel']!=NULL){
$GLOBALS['subcahannel'] = myval($_GET['subcahannel']);
}
$GLOBALS['imgsrv_port'] = 2323 + $GLOBALS['sensor_port']; // read port from some centralized place
$deadline=time()+$MAX_EXECUTION_TIME; $deadline=time()+$MAX_EXECUTION_TIME;
/// set_time_limit(20); - /// does not work! /// set_time_limit(20); - /// does not work!
$exif_get=false; $exif_get=false;
...@@ -341,13 +353,14 @@ function decodeGet ($encoded_get) { ...@@ -341,13 +353,14 @@ function decodeGet ($encoded_get) {
exec("date -s ".date("mdHiY.s",(int)$a),$out,$ret); // set system time exec("date -s ".date("mdHiY.s",(int)$a),$out,$ret); // set system time
break; break;
case "imgsrv": case "imgsrv":
$toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':8081/'; // $toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':8081/';
$toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':'.strval($GLOBALS['imgsrv_port']).'/';
break; break;
case "exif": case "exif":
$exif_get=$value+0; //page number $exif_get=$value+0; //page number
break; break;
case "description": case "description":
if ( $value!==null) elphel_set_exif_field(0x10e, $value.chr(0)); if ( $value!==null) elphel_set_exif_field($GLOBALS['sensor_port'], 0x10e, $value.chr(0));
break; break;
case "circbuf": case "circbuf":
$circbuf_get=true; $circbuf_get=true;
...@@ -379,8 +392,8 @@ function decodeGet ($encoded_get) { ...@@ -379,8 +392,8 @@ function decodeGet ($encoded_get) {
if (array_key_exists("dbgwait",$_GET)) { if (array_key_exists("dbgwait",$_GET)) {
/// NOTE: DOES not notice if connection is reset by the client and keeps php busy !... /// NOTE: DOES not notice if connection is reset by the client and keeps php busy !...
while (elphel_get_P_value(ELPHEL_DEBUG+(1<<21)+(28<<16))) { while (elphel_get_P_value($GLOBALS['sensor_port'],ELPHEL_DEBUG+(1<<21)+(28<<16))) {
elphel_skip_frames(1); elphel_skip_frames($GLOBALS['sensor_port'],1);
if (time()>$deadline) { if (time()>$deadline) {
error_log("Aborted due to custom timeout"); error_log("Aborted due to custom timeout");
exit(1); exit(1);
...@@ -389,7 +402,7 @@ function decodeGet ($encoded_get) { ...@@ -389,7 +402,7 @@ function decodeGet ($encoded_get) {
} }
/// Do whatever needed /// Do whatever needed
$allNative=elphel_get_P_arr($allNative); $allNative=elphel_get_P_arr($GLOBALS['sensor_port'],$allNative);
$parVal=array(); $parVal=array();
// foreach ($get as $key=>$value) $parVal[$key]= abstractValue($key); // foreach ($get as $key=>$value) $parVal[$key]= abstractValue($key);
foreach ($get as $key=>$value) $parVal[$key]= abstractValue($key); foreach ($get as $key=>$value) $parVal[$key]= abstractValue($key);
...@@ -445,20 +458,19 @@ echo "</pre>\n"; ...@@ -445,20 +458,19 @@ echo "</pre>\n";
} }
} }
// if (count($toRead)>0) $toRead=elphel_get_P_arr($toRead); // if (count($toRead)>0) $toRead=elphel_get_P_arr($toRead);
if ($_GET["STATE"]!==NULL) $toRead["STATE"]=elphel_get_state(); if ($_GET["STATE"]!==NULL) $toRead["STATE"]=elphel_get_state($GLOBALS['sensor_port']);
if ($_GET["imgsrv"]!==NULL) $toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':8081/'; if ($_GET["imgsrv"]!==NULL) $toRead["imgsrv"]='http://'.$_SERVER['HTTP_HOST'].':'.strval($GLOBALS['imgsrv_port']).'/';
foreach ($debug_arr as $key=>$value) { foreach ($debug_arr as $key=>$value) {
$xml->addChild ($key,$value); $xml->addChild ($key,$value);
} }
$xml->addChild ("ELPHEL_DEBUG__0128",elphel_get_P_value(ELPHEL_DEBUG+(1<<21)+(28<<16))); $xml->addChild ("ELPHEL_DEBUG__0128",elphel_get_P_value($GLOBALS['sensor_port'],ELPHEL_DEBUG+(1<<21)+(28<<16)));
foreach ($toRead as $key=>$value) { foreach ($toRead as $key=>$value) {
$xml->addChild ($key,$value); $xml->addChild ($key,$value);
} }
if ($exif_get!==false) { if ($exif_get!==false) {
$exif_got=elphel_get_exif_elphel($exif_get); $exif_got=elphel_get_exif_elphel($GLOBALS['sensor_port'],$exif_get);
if ($exif_got) { if ($exif_got) {
$xml->addChild ('Exif'); $xml->addChild ('Exif');
$xml->Exif->addChild ("Exif_page",$exif_get); $xml->Exif->addChild ("Exif_page",$exif_get);
...@@ -472,24 +484,24 @@ $xml->addChild ("ELPHEL_DEBUG__0128",elphel_get_P_value(ELPHEL_DEBUG+(1<<21)+(28 ...@@ -472,24 +484,24 @@ $xml->addChild ("ELPHEL_DEBUG__0128",elphel_get_P_value(ELPHEL_DEBUG+(1<<21)+(28
if ($hist_in_thresh) { if ($hist_in_thresh) {
$xml->addChild ('hist_in'); $xml->addChild ('hist_in');
$xml->hist_in->addChild ('hist_in_thresh',$hist_in_thresh); $xml->hist_in->addChild ('hist_in_thresh',$hist_in_thresh);
$xml->hist_in->addChild ('hist_in_r', elphel_histogram(0,elphel_gamma(0,$hist_in_thresh))); $xml->hist_in->addChild ('hist_in_r', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],0,elphel_gamma(0,$hist_in_thresh)));
$xml->hist_in->addChild ('hist_in_g', elphel_histogram(1,elphel_gamma(1,$hist_in_thresh))); $xml->hist_in->addChild ('hist_in_g', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],1,elphel_gamma(1,$hist_in_thresh)));
$xml->hist_in->addChild ('hist_in_g2',elphel_histogram(2,elphel_gamma(2,$hist_in_thresh))); $xml->hist_in->addChild ('hist_in_g2',elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],2,elphel_gamma(2,$hist_in_thresh)));
$xml->hist_in->addChild ('hist_in_b', elphel_histogram(3,elphel_gamma(3,$hist_in_thresh))); $xml->hist_in->addChild ('hist_in_b', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],3,elphel_gamma(3,$hist_in_thresh)));
} }
/// here $hist_out_thresh corresponds to output (8-bit) pixel values as fractions of the 8-bit full scale (255) /// here $hist_out_thresh corresponds to output (8-bit) pixel values as fractions of the 8-bit full scale (255)
if ($hist_out_thresh) { if ($hist_out_thresh) {
$xml->addChild ('hist_out'); $xml->addChild ('hist_out');
$xml->hist_out->addChild ('hist_out_thresh',$hist_out_thresh); $xml->hist_out->addChild ('hist_out_thresh',$hist_out_thresh);
$xml->hist_out->addChild ('hist_out_r', elphel_histogram(0,$hist_out_thresh)); $xml->hist_out->addChild ('hist_out_r', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],0,$hist_out_thresh));
$xml->hist_out->addChild ('hist_out_g', elphel_histogram(1,$hist_out_thresh)); $xml->hist_out->addChild ('hist_out_g', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],1,$hist_out_thresh));
$xml->hist_out->addChild ('hist_out_g2',elphel_histogram(2,$hist_out_thresh)); $xml->hist_out->addChild ('hist_out_g2',elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],2,$hist_out_thresh));
$xml->hist_out->addChild ('hist_out_b', elphel_histogram(3,$hist_out_thresh)); $xml->hist_out->addChild ('hist_out_b', elphel_histogram($GLOBALS['sensor_port'], $GLOBALS['subcahannel'],3,$hist_out_thresh));
} }
///circbuf+exif pointres ///circbuf+exif pointres
if ($circbuf_get) { if ($circbuf_get) {
$xml->addChild ('circbuf'); $xml->addChild ('circbuf');
$circbuf=elphel_get_circbuf_pointers(); $circbuf=elphel_get_circbuf_pointers($GLOBALS['sensor_port']);
if (is_array ($circbuf)) { if (is_array ($circbuf)) {
$circbuf_count=count($circbuf); $circbuf_count=count($circbuf);
// $xml->circbuf->addChild ('circbuf_count',$circbuf_count); // $xml->circbuf->addChild ('circbuf_count',$circbuf_count);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*! -----------------------------------------------------------------------------** *! -----------------------------------------------------------------------------**
*! camvc2.html *! camvc2.html
*! *!
*! Copyright (C) 2005-2008 Elphel, Inc. *! Copyright (C) 2005-20016 Elphel, Inc.
*! *!
*! -----------------------------------------------------------------------------** *! -----------------------------------------------------------------------------**
*! *!
...@@ -213,19 +213,19 @@ input { ...@@ -213,19 +213,19 @@ input {
</style> </style>
<title>Elphel Camera Controls</title> <title>Elphel Camera Controls</title>
<script language="javascript" src="elphelSliders2.js?_TIMESTAMP_" type="text/javascript"></script> <script src="elphelSliders2.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="elphelFrames.js?_TIMESTAMP_" type="text/javascript"></script> <script src="elphelFrames.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="elphelTabs.js?_TIMESTAMP_" type="text/javascript"></script> <script src="elphelTabs.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="elphelButtons2.js?_TIMESTAMP_" type="text/javascript"></script> <script src="elphelButtons2.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="elphelContextHelp.js?_TIMESTAMP_" type="text/javascript"></script> <script src="elphelContextHelp.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc2_i18n.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc2_i18n.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_circbuf.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_circbuf.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_camcomm.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_camcomm.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_interface.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_interface.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_main.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_main.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_video.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_video.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_configs.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_configs.js?_TIMESTAMP_" type="text/javascript"></script>
<script language="javascript" src="camvc_dvr.js?_TIMESTAMP_" type="text/javascript"></script> <script src="camvc_dvr.js?_TIMESTAMP_" type="text/javascript"></script>
</head> </head>
<body onload="initOnLoad();" onResize="resizeMainWindow();" onunload="hideStreamPage();" style="background-color: #888888; overflow:hidden;"> <body onload="initOnLoad();" onResize="resizeMainWindow();" onunload="hideStreamPage();" style="background-color: #888888; overflow:hidden;">
...@@ -781,7 +781,7 @@ input { ...@@ -781,7 +781,7 @@ input {
</div> </div>
<!-- end of Help-license --> <!-- end of Help-license -->
<!-- Geometry Controls --> <!-- Geometry Controls -->
<div id="idDivGeometry" style="display:none; position:absolute; left:0; top:0; width:256; background-color: #bbdddd; font-size:14px;"><form> <div id="idDivGeometry" style="display:none; position:absolute; left:0; top:0; width:256; background-color: #bbdddd; font-size:14px;"><form></form>
nothing here now nothing here now
</div> </div>
<!-- end of Geometry Controls --> <!-- end of Geometry Controls -->
......
...@@ -408,6 +408,7 @@ Requests.prototype.sendHttpReq=function() { ...@@ -408,6 +408,7 @@ Requests.prototype.sendHttpReq=function() {
this.prepTodo(); this.prepTodo();
this.serialize(); this.serialize();
this.url=this.php+"?"; this.url=this.php+"?";
this.url+="sensor_port="+document.sensor_port.toString()+"&";
this.cmdRequsted=this.cmdNeeded; ///value of cmdNeeded when request was sent (do detect any parameters set between request sent and received) this.cmdRequsted=this.cmdNeeded; ///value of cmdNeeded when request was sent (do detect any parameters set between request sent and received)
if (this.setStr.length) { if (this.setStr.length) {
......
...@@ -2516,6 +2516,11 @@ function initOnLoad() { ...@@ -2516,6 +2516,11 @@ function initOnLoad() {
if (url.indexOf("highBandwidth")>=0) document.highBandwidth=1; if (url.indexOf("highBandwidth")>=0) document.highBandwidth=1;
if (url.indexOf("//192.")>=0) document.highBandwidth=1; if (url.indexOf("//192.")>=0) document.highBandwidth=1;
if (url.indexOf("//10.")>=0) document.highBandwidth=1; if (url.indexOf("//10.")>=0) document.highBandwidth=1;
// NC393: need to read sensor_port=<0..3> parameter
document.sensor_port = 0;
if (url.indexOf("sensor_port=")>=0) {
document.sensor_port = parseInt(url.substr(url.indexOf("sensor_port=")+12,1), 10);
}
initVideoPlugin(); initVideoPlugin();
...@@ -2544,8 +2549,8 @@ function initOnLoad() { ...@@ -2544,8 +2549,8 @@ function initOnLoad() {
else url+="&reload=0"; else url+="&reload=0";
if ((!window.opener) ||(typeof(window.opener)=="undefined")) { if ((!window.opener) ||(typeof(window.opener)=="undefined")) {
if (window.confirm(document.getElementById("h_reload").innerHTML)) { if (window.confirm(document.getElementById("h_reload").innerHTML)) {
// unique window name (per url) so multiple cameras can be opened // unique window name (per url) so multiple cameras can be opened (url.substr(7) - just to skip 'http://')
win=window.open(url,'ELphel 353 '+url.substr(7),'scrollbars=no,resizable=yes,toolbar=no,location=no,directories=no,menubar=no,status=no' ); win=window.open(url,'Elphel 393 '+url.substr(7)+":"+document.sensor_port.toString(),'scrollbars=no,resizable=yes,toolbar=no,location=no,directories=no,menubar=no,status=no' );
if (win) { if (win) {
win.focus(); win.focus();
parent.window.location="closeme.html";// if did not close parent.window.location="closeme.html";// if did not close
......
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