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
0bf49135
Commit
0bf49135
authored
Jan 05, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+2 buttons
parent
79016d8b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
6 deletions
+83
-6
eyesis4pi_control.php
eyesis4pi_control.php
+52
-3
eyesis4pi.js
js/eyesis4pi.js
+1
-1
tabs.js
js/tabs.js
+29
-1
settings.xml
settings.xml
+1
-1
No files found.
eyesis4pi_control.php
View file @
0bf49135
...
...
@@ -69,6 +69,12 @@ $status = false;
$exit
=
false
;
$run_status
=
false
;
$rec_fast
=
false
;
$rec_norm
=
false
;
$rec_reset
=
false
;
$system_reboot
=
false
;
// keys assign
foreach
(
$_GET
as
$key
=>
$value
)
{
switch
(
$key
)
{
...
...
@@ -86,6 +92,8 @@ foreach($_GET as $key=>$value) {
case
"test"
:
$test
=
true
;
break
;
case
"run_camogm"
:
$run_camogm
=
true
;
break
;
case
"fast_rec"
:
$rec_fast
=
true
;
break
;
case
"norm_rec"
:
$rec_norm
=
true
;
break
;
case
"exit"
:
$exit
=
true
;
break
;
case
"start"
:
$start
=
true
;
break
;
case
"stop"
:
$stop
=
true
;
break
;
...
...
@@ -104,6 +112,9 @@ foreach($_GET as $key=>$value) {
case
"mount"
:
$mount
=
true
;
break
;
case
"unmount"
:
$unmount
=
true
;
break
;
case
"reboot"
:
$system_reboot
=
true
;
break
;
case
"reset_rec"
:
$rec_reset
=
true
;
break
;
case
"get_free_space"
:
$get_free_space
=
true
;
break
;
case
"mount_point"
:
$mount_point
=
$value
;
break
;
...
...
@@ -188,6 +199,30 @@ if ($get_temperature) {
flush
();
}
if
(
$system_reboot
){
print
(
file_get_contents
(
"http://
{
$master
[
'ip'
]
}
/autocampars.php?reboot"
));
}
if
(
$rec_reset
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
file_get_contents
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/eyesis4pi_interface.php?cmd=reset_camogm_fastrec"
,
'r'
);
}
print
(
"ok"
);
}
# presets for recording to a file system
function
set_normal_recording
(
$ip
){
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=set_prefix&prefix=/mnt/sda1/"
,
'r'
);
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setrawdevpath&path=/dev/"
,
'r'
);
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setmov"
,
'r'
);
}
# preset for fast recording to a raw formatted partition
function
set_fast_recording
(
$ip
){
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setrawdevpath&path=/dev/sda2"
,
'r'
);
fopen
(
"http://
{
$ip
}
/camogm_interface.php?cmd=setjpeg"
,
'r'
);
}
//CAMOGM
if
(
$run_camogm
)
{
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
{
...
...
@@ -204,14 +239,16 @@ if ($run_camogm) {
/*
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=set_prefix&prefix=/mnt/sda1/", 'r');
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setrawdevpath&path=", 'r');
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setrawdevpath&path=
/dev/
", 'r');
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setmov", 'r');
*/
set_fast_recording
(
$unique_cams
[
$i
][
'ip'
]);
/*
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setrawdevpath&path=/dev/sda2", 'r');
fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setjpeg", 'r');
*/
// default path UNFORMATTED PARTITION
//fopen("http://{$unique_cams[$i]['ip']}/camogm_interface.php?cmd=setrawdevpath&path=/dev/sda2", 'r');
...
...
@@ -266,6 +303,18 @@ if ($run_camogm) {
}
}
if
(
$rec_fast
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
){
set_fast_recording
(
$unique_cams
[
$i
][
'ip'
]);
}
}
if
(
$rec_norm
){
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
){
set_normal_recording
(
$unique_cams
[
$i
][
'ip'
]);
}
}
if
(
$exit
)
{
for
(
$i
=
0
;
$i
<
count
(
$unique_cams
);
$i
++
)
fopen
(
"http://
{
$unique_cams
[
$i
][
'ip'
]
}
/camogm_interface.php?cmd=exit"
,
'r'
);
}
...
...
js/eyesis4pi.js
View file @
0bf49135
js/tabs.js
View file @
0bf49135
...
...
@@ -246,10 +246,38 @@ function tab3_init(){
c
+=
"<div style='padding:5px;'><b>Temperatures:</b></div><div id='temperatures_map'></div>"
;
c
+=
"<br/><div><button id='other_reboot' title='System reboot'>Reboot</button> <button title='reset raw partitions write pointers' id='other_reset_rec'>Reset REC</button></div>"
;
$
(
"#tab3_contents"
).
html
(
c
);
$
(
"#other_reboot"
).
on
(
"click"
,
system_reboot
);
$
(
"#other_reset_rec"
).
on
(
"click"
,
system_reset_rec
);
}
// TAB 3: end
function
system_reboot
(){
console
.
log
(
"system reboot"
);
var
url
=
"eyesis4pi_control.php?reboot&rq="
+
cams_to_str
();
$
.
ajax
({
url
:
url
,
success
:
function
(
data
){
console
.
log
(
data
);
}
});
}
function
system_reset_rec
(){
console
.
log
(
"system reset rec"
);
var
url
=
"eyesis4pi_control.php?reset_rec&rq="
+
cams_to_str
();
$
.
ajax
({
url
:
url
,
success
:
function
(
data
){
console
.
log
(
data
);
}
});
}
function
previews_init
(){
console
.
log
(
"number of previews is "
+
cams
.
length
);
...
...
settings.xml
View file @
0bf49135
...
...
@@ -10,7 +10,7 @@
<input_quality>
98
</input_quality>
<input_trigger_period>
200
</input_trigger_period>
<input_hdrvexpos>
0x36000
</input_hdrvexpos>
<input_autoexp_max>
2
</input_autoexp_max>
<input_autoexp_max>
1
</input_autoexp_max>
<input_autoexp_lvl>
220
</input_autoexp_lvl>
<input_autoexp_fracpix>
98
</input_autoexp_fracpix>
<input_autoexp_frames_ahead>
1
</input_autoexp_frames_ahead>
...
...
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