Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-autocampars
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
elphel-apps-autocampars
Commits
f384910b
Commit
f384910b
authored
Feb 09, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ code to work with 14MPx
parent
3a71634b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
autocampars.php
src/autocampars.php
+34
-1
No files found.
src/autocampars.php
View file @
f384910b
...
...
@@ -726,7 +726,24 @@ function detect_camera(){
log_msg
(
"COMMAND_OUTPUT for 'autocampars.py localhost py393 hargs-power_par12':
\n
"
.
print_r
(
$output
,
1
)
.
"
\n
command return value="
.
$retval
.
"
\n
"
);
}
else
{
}
else
if
(
$GLOBALS
[
'camera_state_arr'
][
'is_mt9f002'
]){
// 2018/02/09: TODO: test
log_msg
(
"Initializing FPGA for HISPI iface"
,
3
);
unset
(
$output
);
// /usr/local/verilog/hargs-hispi - does not exist yet
exec
(
'autocampars.py localhost py393 hargs-hispi'
,
$output
,
$retval
);
$GLOBALS
[
'camera_state_arr'
][
'state'
]
=
'BITSTREAM'
;
write_php_ini
(
$GLOBALS
[
'camera_state_arr'
],
$GLOBALS
[
'camera_state_path'
]
);
foreach
(
$output
as
$k
=>
$v
){
$output
[
$k
]
=
str_replace
(
'\n'
,
"
\n
"
,
$v
);
}
log_msg
(
"COMMAND_OUTPUT for 'autocampars.py localhost py393 hargs-power_par12':
\n
"
.
print_r
(
$output
,
1
)
.
"
\n
command return value="
.
$retval
.
"
\n
"
);
}
else
{
respond_xml
(
''
,
'Do not know how to initialize master camera '
.
print_r
(
$GLOBALS
[
'camera_state_arr'
][
'is_mt9p006'
],
1
));
}
// can not exit until joined
...
...
@@ -1454,11 +1471,15 @@ function get_application_mode() {
switch
(
$GLOBALS
[
'camera_state_arr'
][
'application'
]){
case
'MT9P006'
:
return
get_mt9p006_mode
();
case
'MT9F002'
:
// 2018/02/09: TODO: test
return
get_mt9f002_mode
();
case
'Eyesis4pi393'
:
return
get_eyesis_mode
();
default
:
respond_xml
(
''
,
'Unknown camera type, '
.
print_r
(
$GLOBALS
[
'camera_state_arr'
],
1
));
}
// 2018/02/09: add other sensors as well?
if
(
$GLOBALS
[
'camera_state_arr'
][
'application'
]
==
'MT9P006'
)
return
$GLOBALS
[
'camera_state_arr'
];
}
...
...
@@ -1511,6 +1532,18 @@ function get_mt9p006_mode() {
return
$mode
;
}
// 2018/02/09: TODO: test
function
get_mt9f002_mode
()
{
$mode
=
get_mt9p006_mode
();
$GLOBALS
[
'camera_state_arr'
][
'is_mt9p006'
]
=
0
;
$GLOBALS
[
'camera_state_arr'
][
'is_mt9f002'
]
=
1
;
write_php_ini
(
$GLOBALS
[
'camera_state_arr'
],
$GLOBALS
[
'camera_state_path'
]
);
return
$mode
;
}
/**
* Eyesis application modes:
* 1001 - top, slave, controls own power, default IP = 161
...
...
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