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
1ec31a61
Commit
1ec31a61
authored
Nov 15, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for mux mode in application MT9P006
parent
7033219d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
autocampars.php
src/autocampars.php
+18
-6
No files found.
src/autocampars.php
View file @
1ec31a61
...
@@ -617,7 +617,7 @@ function detect_camera(){
...
@@ -617,7 +617,7 @@ function detect_camera(){
log_msg
(
"boot"
,
0
);
log_msg
(
"boot"
,
0
);
// Apply sensor mask from the application mode, update sysfs
// Apply sensor mask from the application mode, update sysfs
$sensor_mask
=
get_application_mode
();
// 20 bit - for each channel of each port and port multiplexers (typical Eyesis 0xf7777)
$sensor_mask
=
get_application_mode
();
// 20 bit - for each channel of each port and port multiplexers (typical Eyesis 0xf7777)
log_msg
(
sprintf
(
"Using sensor mask 0x%x"
,
$sensor_mask
));
log_msg
(
sprintf
(
"Using sensor mask 0x%x"
,
$sensor_mask
));
$needupdate
=
0
;
$needupdate
=
0
;
...
@@ -718,11 +718,12 @@ function detect_camera(){
...
@@ -718,11 +718,12 @@ function detect_camera(){
print_r
(
$output
,
1
)
.
"
\n
command return value="
.
$retval
.
"
\n
"
);
print_r
(
$output
,
1
)
.
"
\n
command return value="
.
$retval
.
"
\n
"
);
}
else
{
}
else
{
respond_xml
(
''
,
'Do not know how to initialize master camera '
.
pri
m
t_r
(
$GLOBALS
[
'camera_state_arr'
][
'is_mt9p006'
],
1
));
respond_xml
(
''
,
'Do not know how to initialize master camera '
.
pri
n
t_r
(
$GLOBALS
[
'camera_state_arr'
][
'is_mt9p006'
],
1
));
}
}
// can not exit until joined
// can not exit until joined
case
'PRE10359'
:
// Entry point for Eyesis slave cameras that have 10359B multiplexers on their ports
case
'PRE10359'
:
// Entry point for Eyesis slave cameras that have 10359B multiplexers on their ports
//log_msg('PRE10359 '.print_r($GLOBALS['port_mux'],1));
if
(
$GLOBALS
[
'port_mux'
])
{
if
(
$GLOBALS
[
'port_mux'
])
{
for
(
$port
=
0
;
$port
<
4
;
$port
++
)
{
for
(
$port
=
0
;
$port
<
4
;
$port
++
)
{
if
(
$GLOBALS
[
'port_mux'
][
$port
]
!=
'none'
)
{
if
(
$GLOBALS
[
'port_mux'
][
$port
]
!=
'none'
)
{
...
@@ -1442,11 +1443,15 @@ function get_mt9p006_mode() {
...
@@ -1442,11 +1443,15 @@ function get_mt9p006_mode() {
$mode
=
intval
(
$GLOBALS
[
'camera_state_arr'
][
'mode'
]);
$mode
=
intval
(
$GLOBALS
[
'camera_state_arr'
][
'mode'
]);
// Use same 16-bit mask as in Eyesis?
// Use same 16-bit mask as in Eyesis?
// 1111 -> 1000100010001
// 1111 -> 1000100010001
//
if
((
$mode
&
0xf0000
)
==
0
){
$mode
=
(
$mode
&
1
)
|
((
$mode
&
2
)
<<
3
)
|
((
$mode
&
4
)
<<
6
)
|
((
$mode
&
8
)
<<
9
);
$mode
=
(
$mode
&
1
)
|
((
$mode
&
2
)
<<
3
)
|
((
$mode
&
4
)
<<
6
)
|
((
$mode
&
8
)
<<
9
);
}
$GLOBALS
[
'STOP_AFTER'
]
=
array_merge
(
$GLOBALS
[
'STOP_AFTER'
],
array
(
// overwrite specified fields, keep others
$GLOBALS
[
'STOP_AFTER'
]
=
array_merge
(
$GLOBALS
[
'STOP_AFTER'
],
array
(
// overwrite specified fields, keep others
'BOOT'
=>
false
,
'BOOT'
=>
false
,
'POWERED'
=>
false
,
'POWERED'
=>
false
,
'PRE10359'
=>
fals
e
,
'PRE10359'
=>
tru
e
,
'BITSTREAM'
=>
false
,
'BITSTREAM'
=>
false
,
'SENSORS_DETECTED'
=>
false
,
'SENSORS_DETECTED'
=>
false
,
'SENSORS_SYNCHRONIZED'
=>
false
,
'SENSORS_SYNCHRONIZED'
=>
false
,
...
@@ -2648,7 +2653,14 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
...
@@ -2648,7 +2653,14 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
// /overwrites
// /overwrites
$TRIG_MASTER
=
0
;
// modify for bottom 2 for eyesis? or rely on auto?
$TRIG_MASTER
=
0
;
// modify for bottom 2 for eyesis? or rely on auto?
$TRIG
=
4
;
// $multisensor ? 4 : 0;
$TRIG
=
4
;
// $multisensor ? 4 : 0;
$appmode
=
get_application_mode
();
if
((
$appmode
&
0xf0000
)
!=
0
){
$TRIG_PERIOD
=
25000000
;
}
else
{
$TRIG_PERIOD
=
$eyesis_mode
?
25000000
:
10000000
;
// 10 fps
$TRIG_PERIOD
=
$eyesis_mode
?
25000000
:
10000000
;
// 10 fps
}
$TRIG_CONDITION
=
$eyesis_mode
?
0x08000
:
0x00000
;
$TRIG_CONDITION
=
$eyesis_mode
?
0x08000
:
0x00000
;
$TRIG_OUT
=
$eyesis_mode
?
0x20000
:
0x00000
;
$TRIG_OUT
=
$eyesis_mode
?
0x20000
:
0x00000
;
$MULTI_MODE
=
$multisensor
?
1
:
0
;
$MULTI_MODE
=
$multisensor
?
1
:
0
;
...
...
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