Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eyesis4pi-393-gui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
eyesis4pi-393-gui
Commits
3533e55e
Commit
3533e55e
authored
Oct 14, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lots of changes related to porting
parent
28517d8b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
310 additions
and
297 deletions
+310
-297
camogm.js
camogm.js
+60
-42
eyesis4pi.js
eyesis4pi.js
+63
-36
eyesis4pi_control.php
eyesis4pi_control.php
+164
-197
eyesis_daemon.php
eyesis_daemon.php
+1
-1
index.css
index.css
+1
-1
index.html
index.html
+3
-1
settings.js
settings.js
+1
-1
settings.xml
settings.xml
+5
-6
single.html
single.html
+1
-1
tabs.js
tabs.js
+1
-1
tests.js
tests.js
+10
-10
No files found.
camogm.js
View file @
3533e55e
...
@@ -28,9 +28,9 @@ function camogm_rec_start(){
...
@@ -28,9 +28,9 @@ function camogm_rec_start(){
function
camogm_rec_stop
(){
function
camogm_rec_stop
(){
console
.
log
(
"camogm: stop recording"
);
console
.
log
(
"camogm: stop recording"
);
camogm_cmd
(
"stop"
,
false
);
camogm_cmd
(
"stop"
,
false
);
camogm_cmd
(
"unmount"
,
true
);
//replaced with sync
//
camogm_cmd("unmount",true);//replaced with sync
clearInterval
(
intvl_hdd_free_space
);
setTimeout
(
"clearInterval(intvl_hdd_free_space)"
,
10000
);
clearInterval
(
intvl_camogm_status
);
setTimeout
(
"clearInterval(intvl_camogm_status)"
,
10000
);
intvl_hdd_free_space
=
false
;
intvl_hdd_free_space
=
false
;
intvl_camogm_status
=
false
;
intvl_camogm_status
=
false
;
green_the_bars
();
green_the_bars
();
...
@@ -38,7 +38,9 @@ function camogm_rec_stop(){
...
@@ -38,7 +38,9 @@ function camogm_rec_stop(){
function
camogm_cmd
(
cmd
,
async
,
callback
)
{
function
camogm_cmd
(
cmd
,
async
,
callback
)
{
var
url
=
"eyesis4pi_control.php?"
+
cmd
+
"&master_ip="
+
master_ip
+
"&n="
+
n
+
"&rec_delay="
+
camogm_rec_delay
;
var
rq_str
=
"rq="
+
get_unique_rq_str
();
var
url
=
"eyesis4pi_control.php?"
+
cmd
+
"&"
+
rq_str
+
"&rec_delay="
+
camogm_rec_delay
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
...
@@ -55,10 +57,28 @@ function camogm_create_table(){
...
@@ -55,10 +57,28 @@ function camogm_create_table(){
var
table_html
=
""
;
var
table_html
=
""
;
if
(
camogm_en
)
{
if
(
camogm_en
)
{
table_html
=
"<tr>
\n
\
t<td></td>
\n
\
t<td align='center'>SSD free space</td>
\n
<td> Buffer (important when recording)</td></tr>"
;
table_html
=
"<tr>
\n
\
t<td align='center'>IP</td>
\n
\
t<td align='center'>SSD free space</td>
\n
<td>channel</td><td> Buffer (important when recording)</td></tr>"
;
var
unique
=
get_unique_cams
();
var
j
=
0
;
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
table_html
+=
"<tr>
\n
\
t<td>channel "
+
(
i
+
1
)
+
"</td><td id='cam"
+
i
+
"_hdd' align='right'></td><td><div id='buffer"
+
i
+
"_sum' class='buffer'><div id='buffer"
+
i
+
"' style='width:200px;' class='buffer_free'>free</div></div></td></tr>"
;
if
(
unique
.
indexOf
(
cams
[
i
])
!=-
1
){
tmpstr
=
cams
[
i
].
ip
;
hddid
=
"cam"
+
j
+
"_hdd"
;
j
++
;
}
else
{
tmpstr
=
""
;
hddid
=
""
;
}
table_html
+=
"<tr>
\n
\
t
\
<td>"
+
tmpstr
+
"</td>
\
<td id='"
+
hddid
+
"' align='right'></td>
\
<td align='center'>"
+
(
i
+
1
)
+
"</td>
\
<td><div id='buffer"
+
i
+
"_sum' class='buffer'><div id='buffer"
+
i
+
"' style='width:200px;' class='buffer_free'>free</div></div></td>
\
</tr>"
;
}
}
}
}
...
@@ -74,8 +94,8 @@ function camogm_get_hdd_free_space(mount_en){
...
@@ -74,8 +94,8 @@ function camogm_get_hdd_free_space(mount_en){
// }else{
// }else{
// camogm_cmd("get_hdd_space&mount_point=/var/html/CF",true,camogm_parse_hdd_free_space);
// camogm_cmd("get_hdd_space&mount_point=/var/html/CF",true,camogm_parse_hdd_free_space);
// }
// }
camogm_cmd
(
"get_hdd_space&mount_point=/
var/html/CF
"
,
true
,
camogm_parse_hdd_free_space
);
camogm_cmd
(
"get_hdd_space&mount_point=/
mnt/sda1
"
,
true
,
camogm_parse_hdd_free_space
);
camogm_cmd
(
"unmount"
,
true
);
//
camogm_cmd("unmount",true);
}
}
function
camogm_parse_hdd_free_space
(
data
){
function
camogm_parse_hdd_free_space
(
data
){
...
@@ -83,24 +103,27 @@ function camogm_parse_hdd_free_space(data){
...
@@ -83,24 +103,27 @@ function camogm_parse_hdd_free_space(data){
var
end
=
" KB"
;
var
end
=
" KB"
;
var
random_color
=
"rgba("
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
",1)"
;
var
random_color
=
"rgba("
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
","
+
Math
.
floor
(
Math
.
random
()
*
128
)
+
",1)"
;
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
var
i
=
0
;
raw_data
=
+
$
(
data
).
find
(
'cam'
+
(
i
+
1
)).
find
(
'hdd_free_space'
).
text
();
$
(
data
).
find
(
"hdd_free_space"
).
each
(
function
(){
end
=
" KB"
;
raw_data
=
+
$
(
this
).
text
();
end
=
" KB"
;
for
(
var
j
=
0
;
j
<
3
;
j
++
)
{
for
(
var
j
=
0
;
j
<
3
;
j
++
)
{
raw_data
=
Math
.
round
(
10
*
raw_data
/
1024
)
/
10
;
raw_data
=
Math
.
round
(
10
*
raw_data
/
1024
)
/
10
;
if
(
j
==
1
)
end
=
" MB"
;
if
(
j
==
1
)
end
=
" MB"
;
if
(
j
==
2
)
end
=
" GB"
;
if
(
j
==
2
)
end
=
" GB"
;
//IGNORE!
//emergency stop
//emergency stop
if
((
j
==
1
)
&&
(
raw_data
<
128
))
{
//
if ((j==1)&&(raw_data<128)) {
status_message
(
false
,
"SSD: low free space"
);
//
status_message(false,"SSD: low free space");
camogm_rec_stop
();
//
camogm_rec_stop();
}
//
}
if
(
raw_data
<
1024
)
break
;
if
(
raw_data
<
1024
)
break
;
}
}
$
(
"#cam"
+
(
i
+
1
)
+
"_hdd"
).
html
(
"<b style='color:"
+
random_color
+
";'>"
+
raw_data
+
end
+
"</b>"
);
$
(
"#cam"
+
(
i
)
+
"_hdd"
).
html
(
"<b style='color:"
+
random_color
+
";'>"
+
raw_data
+
end
+
"</b>"
);
}
i
++
;
});
}
}
function
camogm_status
(
async
){
function
camogm_status
(
async
){
...
@@ -112,26 +135,23 @@ function camogm_parse_status(data){
...
@@ -112,26 +135,23 @@ function camogm_parse_status(data){
var
buf_used
;
var
buf_used
;
var
buf_sum
;
var
buf_sum
;
var
i
=
0
;
$
(
data
).
find
(
'camogm_state'
).
each
(
function
(){
buf_free
=
+
$
(
this
).
find
(
"sensor_port_0"
).
find
(
'buffer_free'
).
text
();
buf_used
=
+
$
(
this
).
find
(
"sensor_port_0"
).
find
(
'buffer_free'
).
text
();
buf_sum
=
buf_free
+
buf_used
;
//ignore
//$("#buffer"+i).css({width:(Math.round(buf_free/buf_sum*$("#buffer"+i+"_sum").width()))+"px"});
i
++
;
});
//$(data).find('cam')
var
state
=
"running"
;
$
(
data
).
find
(
'camogm_state'
).
each
(
function
(){
tmp_state
=
$
(
this
).
find
(
'state'
).
text
();
if
(
tmp_state
!=
'"running"'
)
state
=
tmp_state
;
});
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
buf_free
=
+
$
(
data
).
find
(
'cam'
+
(
i
+
1
)).
find
(
'camogm_state'
).
find
(
'buffer_free'
).
text
();
buf_used
=
+
$
(
data
).
find
(
'cam'
+
(
i
+
1
)).
find
(
'camogm_state'
).
find
(
'buffer_used'
).
text
();
buf_sum
=
buf_free
+
buf_used
;
$
(
"#buffer"
+
(
i
+
1
)).
css
({
width
:(
Math
.
round
(
buf_free
/
buf_sum
*
$
(
"#buffer"
+
(
i
+
1
)
+
"_sum"
).
width
()))
+
"px"
});
}
var
state
=
""
;
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
state
=
$
(
data
).
find
(
'cam'
+
(
i
+
1
)).
find
(
'camogm_state'
).
find
(
'state'
).
text
();
if
(
state
!=
'"running"'
)
break
;
state
=
"running"
;
}
if
(
camogm_en
)
{
if
(
camogm_en
)
{
//status_update(state);
//status_update(state);
$
(
"#status"
).
html
(
state
);
$
(
"#status"
).
html
(
state
);
...
@@ -156,10 +176,9 @@ function camogm_parse_status(data){
...
@@ -156,10 +176,9 @@ function camogm_parse_status(data){
function
camogm_parse_state
(
data
){
function
camogm_parse_state
(
data
){
var
tmp
;
var
tmp
;
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
$
(
data
).
find
(
"camogm_state"
).
each
(
function
(){
tmp
=
$
(
data
).
find
(
'cam'
+
(
i
+
1
)).
find
(
'camogm_state'
).
text
();
if
(
$
(
this
).
text
()
==
"off"
)
tmp
=
$
(
this
).
text
();
if
(
tmp
==
"off"
)
break
;
});
}
if
(
tmp
!=
"off"
)
{
if
(
tmp
!=
"off"
)
{
camogm_create_table
();
camogm_create_table
();
...
@@ -170,12 +189,11 @@ function camogm_parse_state(data){
...
@@ -170,12 +189,11 @@ function camogm_parse_state(data){
}
else
{
}
else
{
camogm_launch
(
true
);
camogm_launch
(
true
);
}
}
}
}
function
green_the_bars
()
{
function
green_the_bars
()
{
for
(
var
i
=
0
;
i
<
n
;
i
++
)
{
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
$
(
"#buffer"
+
(
i
+
1
)).
css
({
width
:
$
(
"#buffer"
+
(
i
+
1
)
+
"_sum"
).
width
()
+
"px"
});
$
(
"#buffer"
+
i
).
css
({
width
:
$
(
"#buffer"
+
i
+
"_sum"
).
width
()
+
"px"
});
}
}
}
}
...
@@ -183,7 +201,7 @@ function camogm_launch_response(){
...
@@ -183,7 +201,7 @@ function camogm_launch_response(){
console
.
log
(
"camogm launch response"
);
console
.
log
(
"camogm launch response"
);
clearInterval
(
intvl_status
);
clearInterval
(
intvl_status
);
status_message
(
false
,
"camogm launched"
);
status_message
(
false
,
"camogm launched"
);
camogm_cmd
(
"mount"
,
false
);
//
camogm_cmd("mount",false);
camogm_status
(
true
);
camogm_status
(
true
);
green_the_bars
();
green_the_bars
();
camogm_get_hdd_free_space
(
true
);
camogm_get_hdd_free_space
(
true
);
...
...
eyesis4pi.js
View file @
3533e55e
...
@@ -18,7 +18,10 @@ var np = 10;
...
@@ -18,7 +18,10 @@ var np = 10;
var
mask
=
"0x1ff"
;
var
mask
=
"0x1ff"
;
var
camogm_en
=
true
;
var
camogm_en
=
true
;
var
imu_logger_en
=
true
;
//var imu_logger_en = true;
var
imu_logger_en
=
false
;
var
eyesis4pi_en
=
true
;
var
eyesis4pi_en
=
true
;
var
triclops_en
=
false
;
var
triclops_en
=
false
;
var
phg21_en
=
false
;
var
phg21_en
=
false
;
...
@@ -35,20 +38,20 @@ var pc_gps_imu_device_name = "/dev/sda1";
...
@@ -35,20 +38,20 @@ var pc_gps_imu_device_name = "/dev/sda1";
var
camogm_rec_delay
=
5
;
var
camogm_rec_delay
=
5
;
var
cams
=
[
var
cams
=
[
{
"ip"
:
"192.168.0.161"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
,
"logger"
:
1
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
1
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
1
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
}
{
"ip"
:
"192.168.0.163"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
}
];
];
function
get_master_index
(){
function
get_master_index
(){
for
(
var
i
=
0
;
i
<
cam
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
cam
s
.
length
;
i
++
){
if
(
cams
[
i
].
master
==
1
){
if
(
cams
[
i
].
master
==
1
){
return
i
;
return
i
;
}
}
...
@@ -97,7 +100,7 @@ function init(){
...
@@ -97,7 +100,7 @@ function init(){
//get the mask - number of sensors on each subcamera
//get the mask - number of sensors on each subcamera
parseURL
();
////
parseURL();
//getSettings('settings.xml','pars');
//getSettings('settings.xml','pars');
getSettings
(
settings_file
,
'all'
);
getSettings
(
settings_file
,
'all'
);
...
@@ -106,19 +109,19 @@ function init(){
...
@@ -106,19 +109,19 @@ function init(){
else
tab1_init
(
"pc"
);
else
tab1_init
(
"pc"
);
select_tab
(
1
);
select_tab
(
1
);
rewriteURL
();
////
rewriteURL();
get_free_space
(
"/data/footage"
);
get_free_space
(
"/data/footage"
);
tab3_init
();
tab3_init
();
console
.
log
(
"previews_init()"
);
console
.
log
(
"previews_init()"
);
previews_init
();
previews_init
();
init_temperatures_table
();
//
init_temperatures_table();
white_balance_sliders_init
();
white_balance_sliders_init
();
//apply parameters
//apply parameters
read_temperatures
();
//
read_temperatures();
if
(
!
disable_intervals
)
intvl_temperatures
=
setInterval
(
"read_temperatures()"
,
60000
);
//
if (!disable_intervals) intvl_temperatures = setInterval("read_temperatures()",60000);
if
(
!
disable_intervals
)
intvl_histograms
=
setInterval
(
"refresh_histograms()"
,
3000
);
//
if (!disable_intervals) intvl_histograms = setInterval("refresh_histograms()",3000);
refresh_images
();
refresh_images
();
...
@@ -129,7 +132,7 @@ function init(){
...
@@ -129,7 +132,7 @@ function init(){
camogm_cmd
(
"run_status"
,
false
,
camogm_parse_state
);
camogm_cmd
(
"run_status"
,
false
,
camogm_parse_state
);
}
}
//master_ip = $("#address_field1").val().substr(-3,3);
//master_ip = $("#address_field1").val().substr(-3,3);
var
tmp
=
cams
[
get_master_index
()];
var
tmp
=
cams
[
get_master_index
()]
.
ip
;
master_ip
=
tmp
.
substr
(
-
3
,
3
);
master_ip
=
tmp
.
substr
(
-
3
,
3
);
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
...
@@ -166,13 +169,13 @@ function init(){
...
@@ -166,13 +169,13 @@ function init(){
//setTimeout("refresh_images()",1000);
//setTimeout("refresh_images()",1000);
//update_cf_index();
//update_cf_index();
master_ip_change_init
();
//
master_ip_change_init();
$
(
"#single_shots_div"
).
attr
(
"href"
,
"single.html?ip="
+
master_ip
+
"&n="
+
n
+
"&mode=5"
+
"&period="
+
(
$
(
"#input_trigger_period"
).
val
()
*
96
000
));
$
(
"#single_shots_div"
).
attr
(
"href"
,
"single.html?ip="
+
master_ip
+
"&n="
+
n
+
"&mode=5"
+
"&period="
+
(
$
(
"#input_trigger_period"
).
val
()
*
100
000
));
$
(
"#system_tests_div"
).
attr
(
"href"
,
"tests.html?master_ip="
+
master_ip
+
"&n="
+
n
);
$
(
"#system_tests_div"
).
attr
(
"href"
,
"tests.html?master_ip="
+
master_ip
+
"&n="
+
n
);
resync
();
//
resync();
}
}
function
status_update
(
status
)
{
function
status_update
(
status
)
{
...
@@ -334,6 +337,30 @@ function get_rq_str(){
...
@@ -334,6 +337,30 @@ function get_rq_str(){
return
rq_str
;
return
rq_str
;
}
}
function
get_unique_rq_str
(){
res_full
=
get_unique_cams
();
rq_str
=
""
;
for
(
var
i
=
0
;
i
<
res_full
.
length
;
i
++
){
if
(
i
!=
0
){
rq_str
+=
","
;
}
rq_str
+=
res_full
[
i
].
ip
+
":"
+
res_full
[
i
].
port
+
":"
+
res_full
[
i
].
channel
+
":"
+
res_full
[
i
].
master
;
}
return
rq_str
;
}
function
get_unique_cams
(){
res
=
[];
res_full
=
[];
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
){
if
(
res
.
indexOf
(
cams
[
i
].
ip
)
==-
1
)
{
res
.
push
(
cams
[
i
].
ip
);
res_full
.
push
(
cams
[
i
]);
}
}
return
res_full
;
}
function
settings_activate
()
{
function
settings_activate
()
{
if
(
!
$
(
"#settings"
).
is
(
":visible"
))
{
if
(
!
$
(
"#settings"
).
is
(
":visible"
))
{
$
(
"#settings"
).
css
({
top
:
'50px'
,
left
:
'10px'
,
'z-index'
:
3
}).
fadeToggle
(
300
,
function
(){
$
(
"#settings"
).
css
({
top
:
'50px'
,
left
:
'10px'
,
'z-index'
:
3
}).
fadeToggle
(
300
,
function
(){
...
@@ -433,7 +460,7 @@ function set_quality(direction){
...
@@ -433,7 +460,7 @@ function set_quality(direction){
}
}
function
set_trigger_period
(
async
,
callback
)
{
function
set_trigger_period
(
async
,
callback
)
{
set_parameter
(
master_ip
,
"TRIG_PERIOD"
,
+
$
(
"#input_trigger_period"
).
val
()
*
96
000
,
async
,
callback
);
set_parameter
(
master_ip
,
"TRIG_PERIOD"
,
+
$
(
"#input_trigger_period"
).
val
()
*
100
000
,
async
,
callback
);
send_cmd
(
'set_period'
);
send_cmd
(
'set_period'
);
}
}
function
set_skip_frames_mask
(
async
,
callback
){
set_parameter
(
master_ip
,
"SET_SKIP"
,
$
(
"#input_skip_frames"
).
val
(),
async
,
callback
);}
function
set_skip_frames_mask
(
async
,
callback
){
set_parameter
(
master_ip
,
"SET_SKIP"
,
$
(
"#input_skip_frames"
).
val
(),
async
,
callback
);}
...
@@ -501,7 +528,7 @@ function stop(){
...
@@ -501,7 +528,7 @@ function stop(){
function
set_parameter
(
ip
,
par
,
val
,
async
,
callback
){
function
set_parameter
(
ip
,
par
,
val
,
async
,
callback
){
//console.log("n is "+n);
//console.log("n is "+n);
var
url
=
"eyesis4pi_control.php?set_parameter&
master_ip="
+
ip
+
"&n="
+
n
+
"&pname="
+
par
+
"&pvalue="
+
val
;
var
url
=
"eyesis4pi_control.php?set_parameter&
rq="
+
get_rq_str
()
+
"&pname="
+
par
+
"&pvalue="
+
val
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
...
@@ -514,7 +541,7 @@ function set_parameter(ip,par,val,async,callback){
...
@@ -514,7 +541,7 @@ function set_parameter(ip,par,val,async,callback){
}
}
function
get_parameter
(
ip
,
par
){
function
get_parameter
(
ip
,
par
){
var
url
=
"eyesis4pi_control.php?get_parameter&
master_ip="
+
ip
+
"&n="
+
n
+
"&pname="
+
par
;
var
url
=
"eyesis4pi_control.php?get_parameter&
rq="
+
get_rq_str
()
+
"&pname="
+
par
;
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
...
@@ -563,7 +590,7 @@ function refresh_images_eyesis(){
...
@@ -563,7 +590,7 @@ function refresh_images_eyesis(){
var
W
=
2592
;
var
W
=
2592
;
var
H
=
1944
;
var
H
=
1944
;
var
cnv
=
document
.
getElementById
(
"cam
_
"
+
this
.
index
+
"_canvas"
);
var
cnv
=
document
.
getElementById
(
"cam"
+
this
.
index
+
"_canvas"
);
var
cContext
=
cnv
.
getContext
(
'2d'
);
var
cContext
=
cnv
.
getContext
(
'2d'
);
cnv
.
setAttribute
(
'width'
,
h
);
cnv
.
setAttribute
(
'height'
,
3
*
w
);
cnv
.
setAttribute
(
'width'
,
h
);
cnv
.
setAttribute
(
'height'
,
3
*
w
);
cContext
.
rotate
(
90
*
Math
.
PI
/
180
);
cContext
.
rotate
(
90
*
Math
.
PI
/
180
);
...
@@ -758,7 +785,7 @@ function set_gains(color) {
...
@@ -758,7 +785,7 @@ function set_gains(color) {
function
start_gps_imu_log
(){
function
start_gps_imu_log
(){
//control stop
//control stop
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0.
"
+
master_ip
+
"&cmd=stop"
,
type
:
"GET"
,
async
:
false
});
$
.
ajax
({
url
:
"logger_manager.php?ip="
+
master_ip
+
"&cmd=stop"
,
type
:
"GET"
,
async
:
false
});
//control unmount
//control unmount
//cf_unmount();
//cf_unmount();
//mount
//mount
...
@@ -771,7 +798,7 @@ function start_gps_imu_log(){
...
@@ -771,7 +798,7 @@ function start_gps_imu_log(){
//new start
//new start
var
d
=
new
Date
();
var
d
=
new
Date
();
var
gpsimu_log_filename
=
"/
var/html/CF
/"
+
d
.
getTime
()
+
".log"
;
var
gpsimu_log_filename
=
"/
mnt/sda1
/"
+
d
.
getTime
()
+
".log"
;
var
gpsimu_log_index
=
1
;
var
gpsimu_log_index
=
1
;
var
gpsimu_log_records
=
10000000
;
var
gpsimu_log_records
=
10000000
;
$
.
ajax
({
url
:
"logger_manager.php?ip=192.168.0."
+
master_ip
+
"&cmd=start&file="
+
gpsimu_log_filename
+
"&index="
+
gpsimu_log_index
+
"&n="
+
gpsimu_log_records
,
type
:
"GET"
,
async
:
false
});
$
.
ajax
({
url
:
"logger_manager.php?ip=192.168.0."
+
master_ip
+
"&cmd=start&file="
+
gpsimu_log_filename
+
"&index="
+
gpsimu_log_index
+
"&n="
+
gpsimu_log_records
,
type
:
"GET"
,
async
:
false
});
...
@@ -781,7 +808,7 @@ function start_gps_imu_log(){
...
@@ -781,7 +808,7 @@ function start_gps_imu_log(){
function
stop_gps_imu_log
(){
function
stop_gps_imu_log
(){
//stop
//stop
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0."
+
master_
ip
+
"&cmd=stop"
,
type
:
"GET"
,
async
:
false
});
$
.
ajax
({
url
:
"logger_manager.php?ip=
"
+
cams
[
0
].
ip
+
"&cmd=stop"
,
type
:
"GET"
,
async
:
false
});
//unmount
//unmount
//$.ajax({url:"logger_manager.php?ip=192.168.0."+master_ip+"&cmd=umount",type: "GET",async: false});
//$.ajax({url:"logger_manager.php?ip=192.168.0."+master_ip+"&cmd=umount",type: "GET",async: false});
console
.
log
(
"logger stopped"
);
console
.
log
(
"logger stopped"
);
...
@@ -790,7 +817,7 @@ function stop_gps_imu_log(){
...
@@ -790,7 +817,7 @@ function stop_gps_imu_log(){
function
free_space_gps_imu_log
(){
function
free_space_gps_imu_log
(){
console
.
log
(
"free_space_gps_imu_log()"
);
console
.
log
(
"free_space_gps_imu_log()"
);
//cf_mount();
//cf_mount();
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0."
+
master_ip
+
"&cmd=free_space&mountpoint=/var/html/CF
"
,
type
:
"GET"
,
async
:
false
,
success
:
function
(
data
){
parse_free_space
(
data
);}});
$
.
ajax
({
url
:
"logger_manager.php?ip=
"
+
cams
[
0
].
ip
+
"&cmd=free_space&mountpoint=/mnt/sda1
"
,
type
:
"GET"
,
async
:
false
,
success
:
function
(
data
){
parse_free_space
(
data
);}});
cf_unmount
();
cf_unmount
();
}
}
...
@@ -812,9 +839,9 @@ function parse_free_space(data){
...
@@ -812,9 +839,9 @@ function parse_free_space(data){
function
cf_mount
(){
function
cf_mount
(){
var
device
=
""
;
var
device
=
""
;
if
(
camogm_en
)
device
=
"/dev/
h
da1"
;
if
(
camogm_en
)
device
=
"/dev/
s
da1"
;
else
device
=
$
(
"#gpsimu_device_name"
).
val
();
else
device
=
$
(
"#gpsimu_device_name"
).
val
();
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0.
"
+
master_ip
+
"&cmd=mount&device="
+
device
,
type
:
"GET"
,
async
:
false
});
$
.
ajax
({
url
:
"logger_manager.php?ip="
+
master_ip
+
"&cmd=mount&device="
+
device
,
type
:
"GET"
,
async
:
false
});
}
}
function
cf_unmount
(){
function
cf_unmount
(){
...
@@ -851,7 +878,7 @@ function cf_status_blink(msg){
...
@@ -851,7 +878,7 @@ function cf_status_blink(msg){
function
download_logs
(){
function
download_logs
(){
$
.
ajax
({
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0."
+
master_
ip
+
"&cmd=download&destination="
+
$
(
"#footage_path"
).
val
()
+
"/"
+
$
(
"#footage_subfolder"
).
val
(),
url
:
"logger_manager.php?ip=
"
+
cams
[
0
].
ip
+
"&cmd=download&destination="
+
$
(
"#footage_path"
).
val
()
+
"/"
+
$
(
"#footage_subfolder"
).
val
(),
type
:
"GET"
,
type
:
"GET"
,
async
:
true
async
:
true
}).
done
(
function
(){
}).
done
(
function
(){
...
@@ -870,7 +897,7 @@ function clean_cf_card(){
...
@@ -870,7 +897,7 @@ function clean_cf_card(){
function
cf_clean
(){
function
cf_clean
(){
$
.
ajax
({
$
.
ajax
({
url
:
"logger_manager.php?ip=
192.168.0."
+
master_ip
+
"&cmd=clean&mountpoint=/var/html/CF
"
,
url
:
"logger_manager.php?ip=
"
+
cams
[
0
].
ip
+
"&cmd=clean&mountpoint=/mnt/sda1
"
,
type
:
"GET"
,
type
:
"GET"
,
async
:
true
async
:
true
}).
done
(
function
(){
}).
done
(
function
(){
...
@@ -882,7 +909,7 @@ function cf_clean(){
...
@@ -882,7 +909,7 @@ function cf_clean(){
function
update_log_name
(){
function
update_log_name
(){
console
.
log
(
"update_log_name()"
);
console
.
log
(
"update_log_name()"
);
var
logname
=
"/
var/html/CF
/"
+
$
(
'#footage_subfolder'
).
val
()
+
".log"
;
var
logname
=
"/
mnt/sda1
/"
+
$
(
'#footage_subfolder'
).
val
()
+
".log"
;
$
(
'#gpsimu_log_filename'
).
val
(
logname
);
$
(
'#gpsimu_log_filename'
).
val
(
logname
);
//update_cf_index();
//update_cf_index();
}
}
...
@@ -893,7 +920,7 @@ function update_cf_index(){
...
@@ -893,7 +920,7 @@ function update_cf_index(){
//cf_mount();
//cf_mount();
$
.
ajax
({
$
.
ajax
({
url
:
"logger_manager.php?ip=192.168.0."
+
master_ip
+
"&cmd=scandir&mountpoint=/
var/html/CF
"
,
url
:
"logger_manager.php?ip=192.168.0."
+
master_ip
+
"&cmd=scandir&mountpoint=/
mnt/sda1
"
,
type
:
"GET"
,
type
:
"GET"
,
dataType
:
"xml"
,
dataType
:
"xml"
,
complete
:
function
(
response
){
udpate_index
(
response
.
responseXML
);},
complete
:
function
(
response
){
udpate_index
(
response
.
responseXML
);},
...
...
eyesis4pi_control.php
View file @
3533e55e
...
@@ -45,9 +45,7 @@ if (isset($elp_const["elphel"])) {
...
@@ -45,9 +45,7 @@ if (isset($elp_const["elphel"])) {
// defaults
// defaults
$i2c
=
false
;
$i2c
=
false
;
//$master_ip = 221;
$master_ip
=
""
;
$n
=
1
;
$temperature
=
false
;
$temperature
=
false
;
$set_parameter
=
false
;
$set_parameter
=
false
;
$get_parameter
=
false
;
$get_parameter
=
false
;
...
@@ -69,13 +67,10 @@ $run_status = false;
...
@@ -69,13 +67,10 @@ $run_status = false;
// keys assign
// keys assign
foreach
(
$_GET
as
$key
=>
$value
)
{
foreach
(
$_GET
as
$key
=>
$value
)
{
switch
(
$key
)
{
switch
(
$key
)
{
case
"master_ip"
:
$master_ip
=
$value
+
0
;
break
;
case
"n"
:
$n
=
$value
+
0
;
break
;
case
"set_parameter"
:
$set_parameter
=
true
;
break
;
case
"set_parameter"
:
$set_parameter
=
true
;
break
;
case
"get_parameter"
:
$get_parameter
=
true
;
break
;
case
"get_parameter"
:
$get_parameter
=
true
;
break
;
case
"pname"
:
$pname
=
$value
;
break
;
case
"pname"
:
$pname
=
$value
;
break
;
case
"pvalue"
:
$pvalue
=
$value
+
0
;
break
;
case
"pvalue"
:
$pvalue
=
$value
;
break
;
case
"i2c"
:
$i2c
=
true
;
break
;
case
"i2c"
:
$i2c
=
true
;
break
;
case
"i2c_width"
:
$i2c_width
=
$value
;
break
;
case
"i2c_width"
:
$i2c_width
=
$value
;
break
;
...
@@ -113,97 +108,68 @@ foreach($_GET as $key=>$value) {
...
@@ -113,97 +108,68 @@ foreach($_GET as $key=>$value) {
}
}
}
}
$master_ip
=
""
;
$master_port
=
""
;
$master_channel
=
""
;
// keys assign
$cams
=
array
();
if
(
isset
(
$_GET
[
'rq'
])){
$pars
=
explode
(
","
,
$_GET
[
'rq'
]);
foreach
(
$pars
as
$val
){
$ip
=
strtok
(
$val
,
":"
);
$port
=
strtok
(
":"
);
$channel
=
strtok
(
":"
);
$master
=
strtok
(
":"
);
array_push
(
$cams
,
array
(
'ip'
=>
$ip
,
'port'
=>
$port
,
'channel'
=>
$channel
,
'master'
=>
$master
));
if
(
$master
==
"1"
){
$master_ip
=
$ip
;
$master_port
=
$port
;
$master_channel
=
$channel
;
}
}
}
//overrides
//overrides
$debuglev
=
0
;
$debuglev
=
0
;
$pc_time
=@
getdate
();
$pc_time
=
getdate
();
// calculate cameras ip addresses based on $master_ip & $n - simple increment from the master camera.
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
$cam_ip
[
$i
]
=
"192.168.0."
.
(
$master_ip
+
$i
);
}
//perform some tests
//perform some tests
if
(
$test
)
{
if
(
$test
)
{
}
}
if
(
$i2c
)
{
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
if
(
$i2c_data
)
$i2c_data_rq
=
"&data=
$i2c_data
"
;
else
$i2c_data_rq
=
""
;
for
(
$i
=
0
;
$i
<
count
(
$cam_ip
);
$i
++
)
{
if
(
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/i2c.php?width=
$i2c_width
&bus=
$i2c_bus
&adr=
$i2c_adr
"
.
$i2c_data_rq
,
'r'
))
{
$content
=
''
;
while
(
$line
=
fread
(
$fp
,
1024
))
{
$content
.=
$line
;
}
$content
=
substr
(
$content
,
21
);
$message_IP
[
$i
]
=
$content
;
}
else
{
$message_IP
[
$i
]
=
"no connection"
;
}
}
for
(
$i
=
0
;
$i
<
count
(
$cam_ip
);
$i
++
)
{
$res_xml
.=
"<camera_
{
$cam
[
$i
]
}
>
\n
"
;
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
"</camera_
{
$cam
[
$i
]
}
>
\n
"
;
}
$res_xml
.=
"</camogm_multiple>
\n
"
;
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
printf
(
"%s"
,
$res_xml
);
flush
();
}
if
(
$set_parameter
)
{
if
(
$set_parameter
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
if
(
$pname
==
"SET_SKIP"
)
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=set_skip&skip_mask="
.
dechex
(
$pvalue
),
'r'
);
if
(
$pname
==
"SET_SKIP"
)
else
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=set_parameter&pname=
$pname
&pvalue=
$pvalue
"
,
'r'
);
$fp
=
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?sensor_port=
{
$cams
[
$i
][
'channel'
]
}
&cmd=set_skip&skip_mask="
.
dechex
(
$pvalue
)
,
'r'
);
else
if
(
$fp
)
{
$fp
=
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?sensor_port=
{
$cams
[
$i
][
'channel'
]
}
&cmd=set_parameter&pname=
$pname
&pvalue=
$pvalue
"
,
'r'
);
$content
=
''
;
while
(
$line
=
fread
(
$fp
,
1024
)
)
{
if
(
$fp
)
{
$content
.=
$line
;
$content
=
''
;
}
while
(
$line
=
fread
(
$fp
,
1024
))
{
//$content = substr($content,21)
;
$content
.=
$line
;
$message_IP
[
$i
]
=
$content
;
}
}
else
{
$message_IP
[
$i
]
=
$content
;
$message_IP
[
$i
]
=
"no connection"
;
}
else
{
}
$message_IP
[
$i
]
=
"no connection"
;
$res_xml
.=
$message_IP
[
$i
];
}
}
$res_xml
.=
$message_IP
[
$i
];
}
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Content-Type: text/xml
"
);
header
(
"Pragma: no-cache
\n
"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
printf
(
"%s"
,
$res_xml
);
header
(
"Pragma: no-cache
\n
"
);
flush
(
);
printf
(
"%s"
,
$res_xml
);
flush
();
}
}
if
(
$get_parameter
)
{
if
(
$get_parameter
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
if
(
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=get_parameter&pname=
$pname
"
,
'r'
))
{
$content
=
file_get_contents
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?sensor_port=
{
$cams
[
$i
][
'channel'
]
}
&cmd=get_parameter&pname=
$pname
"
);
$content
=
''
;
$message_IP
[
$i
]
=
$content
;
while
(
$line
=
fread
(
$fp
,
1024
))
{
$res_xml
.=
$message_IP
[
$i
];
$content
.=
$line
;
}
//$content = substr($content,21);
$message_IP
[
$i
]
=
$content
;
}
else
{
$message_IP
[
$i
]
=
$cam_ip
[
$i
];
}
$res_xml
.=
$message_IP
[
$i
];
}
}
header
(
"Content-Type: text/xml"
);
header
(
"Content-Type: text/xml"
);
...
@@ -216,50 +182,77 @@ if ($get_parameter) {
...
@@ -216,50 +182,77 @@ if ($get_parameter) {
//CAMOGM
//CAMOGM
if
(
$run_camogm
)
{
if
(
$run_camogm
)
{
echo
"<pre>"
;
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
// start camogm
// start camogm
if
(
!
$debug
)
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=run_camogm"
,
'r'
);
//if (!$debug) fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=run_camogm", 'r');
else
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=run_camogm&debug=
$debug
&debuglev=
$debuglev
"
,
'r'
);
//else fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=run_camogm&debug=$debug&debuglev=$debuglev", 'r');
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=run_camogm"
,
'r'
);
// set debug level
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=set_debuglev&debuglev=
$debuglev
"
,
'r'
);
// set "/var/0" prefix
//fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=set_prefix&prefix=/var/html/CF/", 'r');
// default path
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=setrawdevpath&path=/dev/sda2"
,
'r'
);
//mount
//fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=mount&partition=/dev/hda1&mountpoint=/var/html/CF", 'r');
// set .mov format
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=setjpeg"
,
'r'
);
// set frames_per_chunk in exif to 1
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=set_frames_per_chunk&frames_per_chunk=1"
,
'r'
);
// set default split parameters
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=set_duration&duration=1000"
,
'r'
);
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=set_size&size=1800000000"
,
'r'
);
//debugging
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=set_max_frames&max_frames=1000"
,
'r'
);
/*
// start camogm
if (!$debug) fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=run_camogm", 'r');
else fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=run_camogm&debug=$debug&debuglev=$debuglev", 'r');
// set debug level
// set debug level
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_debuglev&debuglev=
$debuglev
"
,
'r'
);
fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_debuglev&debuglev=$debuglev", 'r');
// set "/var/0" prefix
// set "/var/0" prefix
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_prefix&prefix=/var/html/CF/"
,
'r'
);
//fopen("http://{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_prefix&prefix=/var/html/CF/", 'r');
// default path
fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=setrawdevpath&path=/dev/sda1", 'r');
//mount
//mount
//fopen("http://
".$cam_ip[$i]."/camogmgui
/camogm_interface.php?cmd=mount&partition=/dev/hda1&mountpoint=/var/html/CF", 'r');
//fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=mount&partition=/dev/hda1&mountpoint=/var/html/CF", 'r');
// set .mov format
// set .mov format
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=setmov"
,
'r'
);
fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=setjpeg", 'r');
// set frames_per_chunk in exif to 1
// set frames_per_chunk in exif to 1
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_frames_per_chunk&frames_per_chunk=1"
,
'r'
);
fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_frames_per_chunk&frames_per_chunk=1", 'r');
// set default split parameters
// set default split parameters
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_duration&duration=1000"
,
'r'
);
fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_duration&duration=1000", 'r');
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_size&size=1800000000"
,
'r'
);
fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_size&size=1800000000", 'r');
//debugging
//debugging
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=set_max_frames&max_frames=1000"
,
'r'
);
fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=set_max_frames&max_frames=1000", 'r');
//fopen("http://".$cam_ip[$i]."/camogmgui/camogm_interface.php?cmd=set_max_frames&max_frames=100", 'r');
//fopen("http://{$cams[$i]['ip']}/camogm_interface.php?cmd=set_max_frames&max_frames=100", 'r');
//create dir
//create dir
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"
/phpshell.php?command=mkdir%20/var/html/CF"
,
'r'
);
//fopen("http://{$cams[$i]['ip']}
/phpshell.php?command=mkdir%20/var/html/CF", 'r');
//set prefix?!
//set prefix?!
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=set_prefix&prefix=/var/html/CF/"
,
'r'
);
//fopen("http://{$cams[$i]['ip']}
/camogm_interface.php?cmd=set_prefix&prefix=/var/html/CF/", 'r');
*/
}
}
}
}
if
(
$exit
)
{
if
(
$exit
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=exit"
,
'r'
);
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=exit"
,
'r'
);
}
}
if
(
$start
)
{
if
(
$start
)
{
if
(
$rec_delay
<>
0
)
{
if
(
$rec_delay
<>
0
)
{
// get time from master camera
// get time from master camera
if
(
$fp
=
fopen
(
"http://
"
.
$cam_ip
[
0
]
.
"/camogmgui/camogm_interface.php?
cmd=gettime"
,
'r'
))
{
if
(
$fp
=
fopen
(
"http://
$master_ip
/camogm_interface.php?sensor_port=
$master_channel
&
cmd=gettime"
,
'r'
))
{
$content
=
''
;
$content
=
''
;
while
(
$line
=
fread
(
$fp
,
1024
))
{
while
(
$line
=
fread
(
$fp
,
1024
))
{
$content
.=
$line
;
$content
.=
$line
;
...
@@ -275,37 +268,38 @@ if ($start) {
...
@@ -275,37 +268,38 @@ if ($start) {
$start_timestamp
=
$current_time
+
$rec_delay
;
$start_timestamp
=
$current_time
+
$rec_delay
;
//was commented for testing
//was commented for testing
//for ($i=0;$i<$n;$i++) fopen("http://".$cam_ip[$i]."/camogm
gui/camogm
_interface.php?cmd=set_start_after_timestamp&start_after_timestamp=$start_timestamp", 'r');
//for ($i=0;$i<$n;$i++) fopen("http://".$cam_ip[$i]."/camogm_interface.php?cmd=set_start_after_timestamp&start_after_timestamp=$start_timestamp", 'r');
}
}
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
file_get_contents
(
"http://"
.
$cam_ip
[
0
]
.
":8081/bimg"
);
//delayed start?
//file_get_contents("http://$master_ip:$master_port/bimg");
//file_get_contents("http://".$cam_ip[0].":8081/bimg");
//file_get_contents("http://".$cam_ip[0].":8081/bimg");
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=start"
,
'r'
);
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=start"
,
'r'
);
}
}
}
}
if
(
$stop
)
{
if
(
$stop
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui
/camogm_interface.php?cmd=stop"
,
'r'
);
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=stop"
,
'r'
);
}
}
if
(
$mount
)
{
if
(
$mount
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
)
;
$i
++
)
{
fopen
(
"http://
"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=mount&partition=/dev/hda1&mountpoint=/var/html/CF
"
,
'r'
);
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=mount&partition=/dev/sda1&mountpoint=/mnt/sda1
"
,
'r'
);
}
}
}
}
if
(
$unmount
)
{
if
(
$unmount
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
)
;
$i
++
)
{
//fopen("http://
".$cam_ip[$i]."/camogmgui
/camogm_interface.php?cmd=unmount&mountpoint=/var/html/CF", 'r');
//fopen("http://
{$cams[$i]['ip']}
/camogm_interface.php?cmd=unmount&mountpoint=/var/html/CF", 'r');
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"
/phpshell.php?command=sync"
,
'r'
);
//fopen("http://{$cams[$i]['ip']}
/phpshell.php?command=sync", 'r');
}
}
}
}
if
(
$get_hdd_space
)
{
if
(
$get_hdd_space
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
)
;
$i
++
)
{
if
(
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=get_hdd_space&mountpoint=
$mount_point
"
,
'r'
))
{
//$content = file_get_contents()
if
(
$fp
=
fopen
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=get_hdd_space&mountpoint=
$mount_point
"
,
'r'
))
{
$content
=
''
;
$content
=
''
;
while
(
$line
=
fread
(
$fp
,
1024
))
{
while
(
$line
=
fread
(
$fp
,
1024
))
{
$content
.=
$line
;
$content
.=
$line
;
...
@@ -317,58 +311,20 @@ if ($get_hdd_space) {
...
@@ -317,58 +311,20 @@ if ($get_hdd_space) {
}
else
{
}
else
{
$message_IP
[
$i
]
=
"no connection"
;
$message_IP
[
$i
]
=
"no connection"
;
}
}
}
}
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
for
(
$i
=
0
;
$i
<
count
(
$cam_ip
);
$i
++
)
{
$res_xml
.=
"<cam"
.
(
$i
+
1
)
.
">
\n
"
;
$res_xml
.=
"<hdd_free_space>
\n
"
;
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
"</hdd_free_space>
\n
"
;
$res_xml
.=
"</cam"
.
(
$i
+
1
)
.
">
\n
"
;
}
$res_xml
.=
"</camogm_multiple>
\n
"
;
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
printf
(
"%s"
,
$res_xml
);
flush
();
}
if
(
$status
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
if
(
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmstate.php"
,
'r'
))
{
$content
=
''
;
while
(
$line
=
fread
(
$fp
,
1024
))
{
$content
.=
$line
;
}
$content
=
substr
(
$content
,
21
);
$message_IP
[
$i
]
=
$content
;
/*
if (strpos($content,"<state>\"stopped\"</state>"))
$message_IP[$i] = "recording stopped";
if (strpos($content,"<state>\"running\"</state>"))
$message_IP[$i] = "recording running";
*/
}
else
{
$message_IP
[
$i
]
=
"<span style=
\"
color:#f00;
\"
>no connection</span>"
;
}
}
//add get_hdd_space here
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
$res_xml
.=
"<cam"
.
(
$i
+
1
)
.
">
\n
"
;
$res_xml
.=
"<cam>
\n
"
;
$res_xml
.=
"<hdd_free_space>
\n
"
;
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
"</cam"
.
(
$i
+
1
)
.
">
\n
"
;
$res_xml
.=
"</hdd_free_space>
\n
"
;
$res_xml
.=
"</cam>
\n
"
;
}
}
$res_xml
.=
"</camogm_multiple>
\n
"
;
$res_xml
.=
"</camogm_multiple>
\n
"
;
header
(
"Content-Type: text/xml"
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
...
@@ -376,43 +332,54 @@ if ($status) {
...
@@ -376,43 +332,54 @@ if ($status) {
flush
();
flush
();
}
}
if
(
$run_status
)
{
if
(
$status
)
{
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
if
(
$fp
=
fopen
(
"http://"
.
$cam_ip
[
$i
]
.
"/camogmgui/camogm_interface.php?cmd=run_status"
,
'r'
))
{
$content
=
file_get_contents
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=status"
);
$content
=
''
;
$content
=
substr
(
$content
,
22
);
while
(
$line
=
fread
(
$fp
,
1024
))
{
$message_IP
[
$i
]
=
$content
;
$content
.=
$line
;
}
}
$content
=
new
SimpleXMLElement
(
$content
);
//$content = substr($content,21);
$message_IP
[
$i
]
=
"
\n\t
<camogm_state>"
.
(
$content
->
state
)
.
"</camogm_state>
\n
"
;
/*
if (strpos($content,"<state>\"stopped\"</state>"))
$message_IP[$i] = "recording stopped";
if (strpos($content,"<state>\"running\"</state>"))
$message_IP[$i] = "recording running";
*/
}
else
{
$message_IP
[
$i
]
=
"<span style=
\"
color:#f00;
\"
>no connection</span>"
;
}
}
//add get_hdd_space here
//add get_hdd_space here?
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
for
(
$i
=
0
;
$i
<
$n
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
)
;
$i
++
)
{
$res_xml
.=
"<cam"
.
(
$i
+
1
)
.
"
>
\n
"
;
$res_xml
.=
"<cam
>
\n
"
;
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
"</cam"
.
(
$i
+
1
)
.
"
>
\n
"
;
$res_xml
.=
"</cam
>
\n
"
;
}
}
$res_xml
.=
"</camogm_multiple>
\n
"
;
$res_xml
.=
"</camogm_multiple>
\n
"
;
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
printf
(
"%s"
,
$res_xml
);
flush
();
}
if
(
$run_status
)
{
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
$content
=
file_get_contents
(
"http://
{
$cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=run_status"
);
$content
=
new
SimpleXMLElement
(
$content
);
$message_IP
[
$i
]
=
"
\t
<camogm_state>"
.
(
$content
->
state
)
.
"</camogm_state>
\n
"
;
//add get_hdd_space here?
$res_xml
=
"<?xml version='1.0' standalone='yes'?>
\n
<camogm_multiple>
\n
"
;
}
for
(
$i
=
0
;
$i
<
count
(
$cams
);
$i
++
)
{
$res_xml
.=
"<cam>
\n
"
;
$res_xml
.=
$message_IP
[
$i
];
$res_xml
.=
"</cam>
\n
"
;
}
$res_xml
.=
"</camogm_multiple>
\n
"
;
header
(
"Content-Type: text/xml"
);
header
(
"Content-Type: text/xml"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Content-Length: "
.
strlen
(
$res_xml
)
.
"
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
header
(
"Pragma: no-cache
\n
"
);
printf
(
"%s"
,
$res_xml
);
printf
(
"%s"
,
$res_xml
);
flush
();
flush
();
}
}
?>
?>
\ No newline at end of file
eyesis_daemon.php
View file @
3533e55e
...
@@ -82,7 +82,7 @@ if (!$socket) {
...
@@ -82,7 +82,7 @@ if (!$socket) {
if
(
$cmd
==
"stop"
)
{
if
(
$cmd
==
"stop"
)
{
system
(
"killall -9 recorder.php"
);
system
(
"killall -9 recorder.php"
);
$ci
=
$interval
*
96
000
;
$ci
=
$interval
*
100
000
;
$fp
=
fopen
(
"http://
$master_ip
/camogmgui/camogm_interface.php?sensor_port=
$master_channel
&cmd=set_parameter&pname=TRIG_PERIOD&pvalue="
.
(
$ci
+
1
),
'r'
);
$fp
=
fopen
(
"http://
$master_ip
/camogmgui/camogm_interface.php?sensor_port=
$master_channel
&cmd=set_parameter&pname=TRIG_PERIOD&pvalue="
.
(
$ci
+
1
),
'r'
);
$fp
=
fopen
(
"http://
$master_ip
/camogmgui/camogm_interface.php?sensor_port=
$master_channel
&cmd=set_parameter&pname=TRIG_PERIOD&pvalue="
.
(
$ci
),
'r'
);
$fp
=
fopen
(
"http://
$master_ip
/camogmgui/camogm_interface.php?sensor_port=
$master_channel
&cmd=set_parameter&pname=TRIG_PERIOD&pvalue="
.
(
$ci
),
'r'
);
...
...
index.css
View file @
3533e55e
...
@@ -53,7 +53,7 @@ input{
...
@@ -53,7 +53,7 @@ input{
}
}
#previews
{
#previews
{
width
:
1
37
5
;
width
:
1
54
5
;
height
:
730
;
height
:
730
;
background
:
rgba
(
220
,
220
,
220
,
0.95
);
background
:
rgba
(
220
,
220
,
220
,
0.95
);
/*color: white;*/
/*color: white;*/
...
...
index.html
View file @
3533e55e
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<!--JP4/JPEG Modes -->
<!--JP4/JPEG Modes -->
<tr>
<tr>
<td>
Switch format to
</td>
<td>
Switch format to
</td>
<td><button
id=
"btn_jpeg"
onclick=
"set_color_mode(
1
)"
>
JPEG
</button><button
id=
"btn_jp4"
onclick=
"set_color_mode(5)"
>
JP4
</button></td>
<td><button
id=
"btn_jpeg"
onclick=
"set_color_mode(
0
)"
>
JPEG
</button><button
id=
"btn_jp4"
onclick=
"set_color_mode(5)"
>
JP4
</button></td>
</tr>
</tr>
<!--JP4/JPEG Modes -->
<!--JP4/JPEG Modes -->
<tr>
<tr>
...
@@ -129,11 +129,13 @@
...
@@ -129,11 +129,13 @@
<td
align=
"center"
><input
type=
"checkbox"
id=
"chk_trigger_period"
class=
"apply_checkboxes"
></td>
<td
align=
"center"
><input
type=
"checkbox"
id=
"chk_trigger_period"
class=
"apply_checkboxes"
></td>
</tr>
</tr>
<!--Trigger period - 1/FPS-->
<!--Trigger period - 1/FPS-->
<!--
<tr>
<tr>
<td><div class="fixed_height" >Skip Frames Mask, <span style="font-size:0.7em">(hex - 0x1ff)</span></div></td>
<td><div class="fixed_height" >Skip Frames Mask, <span style="font-size:0.7em">(hex - 0x1ff)</span></div></td>
<td><div class="fixed_height" ><input type="text" id="input_skip_frames" style="width:80px;" value="0x1ff" class="settings_pars" ></div></td>
<td><div class="fixed_height" ><input type="text" id="input_skip_frames" style="width:80px;" value="0x1ff" class="settings_pars" ></div></td>
<td align="center"><input type="checkbox" id="chk_skip_frames" class="apply_checkboxes"></td>
<td align="center"><input type="checkbox" id="chk_skip_frames" class="apply_checkboxes"></td>
</tr>
</tr>
-->
<!--HDR second exposure setting-->
<!--HDR second exposure setting-->
<tr>
<tr>
<td><div
class=
"fixed_height"
>
HDRVexpos,
<span
style=
"font-size:0.7em"
>
(hex - 0x40000)
</span></div></td>
<td><div
class=
"fixed_height"
>
HDRVexpos,
<span
style=
"font-size:0.7em"
>
(hex - 0x40000)
</span></div></td>
...
...
settings.js
View file @
3533e55e
...
@@ -44,7 +44,7 @@ function restore_settings(text,which){
...
@@ -44,7 +44,7 @@ function restore_settings(text,which){
$
(
".settings_paths"
).
each
(
function
(){
$
(
".settings_paths"
).
each
(
function
(){
if
(
$
(
this
).
attr
(
"type"
)
==
"text"
)
$
(
this
).
val
(
data
.
find
(
$
(
this
).
attr
(
'id'
)).
text
());
if
(
$
(
this
).
attr
(
"type"
)
==
"text"
)
$
(
this
).
val
(
data
.
find
(
$
(
this
).
attr
(
'id'
)).
text
());
});
});
update_cf_index
();
if
(
imu_logger_en
)
update_cf_index
();
}
}
if
(
restore_pars_en
)
{
if
(
restore_pars_en
)
{
...
...
settings.xml
View file @
3533e55e
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<Document>
<Document>
<master_ip>
221
</master_ip>
<master_ip>
163
</master_ip>
<rec_mode>
camogm
</rec_mode>
<rec_mode>
camogm
</rec_mode>
<footage_path>
/data/footage
</footage_path>
<footage_path>
/data/footage
</footage_path>
<footage_subfolder>
test
</footage_subfolder>
<footage_subfolder>
test
</footage_subfolder>
<footage_limit>
3000
</footage_limit>
<footage_limit>
3000
</footage_limit>
<gpsimu_device_name>
/dev/hda1
</gpsimu_device_name>
<gpsimu_device_name>
/dev/hda1
</gpsimu_device_name>
<box_force_jp4>
checked
</box_force_jp4>
<box_force_jp4>
checked
</box_force_jp4>
<input_quality>
9
7
</input_quality>
<input_quality>
9
8
</input_quality>
<input_trigger_period>
1000
</input_trigger_period>
<input_trigger_period>
1000
</input_trigger_period>
<input_skip_frames>
0x1ff
</input_skip_frames>
<input_hdrvexpos>
0x36000
</input_hdrvexpos>
<input_hdrvexpos>
0x36000
</input_hdrvexpos>
<input_autoexp_max>
1
</input_autoexp_max>
<input_autoexp_max>
40
</input_autoexp_max>
<input_autoexp_lvl>
2
0
0
</input_autoexp_lvl>
<input_autoexp_lvl>
2
2
0
</input_autoexp_lvl>
<input_autoexp_fracpix>
90
.0
</input_autoexp_fracpix>
<input_autoexp_fracpix>
90
</input_autoexp_fracpix>
<input_autoexp_frames_ahead>
1
</input_autoexp_frames_ahead>
<input_autoexp_frames_ahead>
1
</input_autoexp_frames_ahead>
</Document>
</Document>
\ No newline at end of file
single.html
View file @
3533e55e
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
var
ip
=
"221"
;
var
ip
=
"221"
;
var
n
=
9
;
var
n
=
9
;
var
color
=
5
;
var
color
=
5
;
var
period
=
96
000000
/
2
;
//defult 1/fps when not taking image
var
period
=
100
000000
/
2
;
//defult 1/fps when not taking image
parseURL
();
parseURL
();
set_parameter
(
ip
,
"COLOR"
,
color
);
set_parameter
(
ip
,
"COLOR"
,
color
);
...
...
tabs.js
View file @
3533e55e
...
@@ -118,7 +118,7 @@ function previews_init(){
...
@@ -118,7 +118,7 @@ function previews_init(){
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
cams
.
length
;
i
++
)
{
var
extra
=
""
;
var
extra
=
""
;
//if (i==9) extra = " (stereo)";
//if (i==9) extra = " (stereo)";
c
+=
"<td align='center'>"
+
i
+
extra
+
"</td>"
;
c
+=
"<td align='center'>"
+
(
i
+
1
)
+
extra
+
"</td>"
;
}
}
c
+=
"</tr></table>"
;
c
+=
"</tr></table>"
;
//draw a close window cross
//draw a close window cross
...
...
tests.js
View file @
3533e55e
...
@@ -9,16 +9,16 @@ var working_intvl = false;
...
@@ -9,16 +9,16 @@ var working_intvl = false;
var
eyesis4pi_en
=
true
;
var
eyesis4pi_en
=
true
;
var
cams
=
[
var
cams
=
[
{
"ip"
:
"192.168.0.161"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
,
"logger"
:
1
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
},
{
"ip"
:
"192.168.0.161"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2323
,
"channel"
:
0
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
},
{
"ip"
:
"192.168.0.162"
,
"port"
:
2324
,
"channel"
:
1
,
"master"
:
0
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
1
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2325
,
"channel"
:
2
,
"master"
:
1
,
"logger"
:
0
},
{
"ip"
:
"192.168.0.163"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
}
{
"ip"
:
"192.168.0.163"
,
"port"
:
2326
,
"channel"
:
3
,
"master"
:
0
,
"logger"
:
0
}
];
];
function
get_master_index
(){
function
get_master_index
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment