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
b9e76de7
Commit
b9e76de7
authored
Nov 29, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed parameter4 restore, decreased default autoxeposure percentile
parent
726f0565
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
autocampars.php
src/autocampars.php
+9
-7
No files found.
src/autocampars.php
View file @
b9e76de7
...
@@ -2029,7 +2029,7 @@ JAVASCRIPT;
...
@@ -2029,7 +2029,7 @@ JAVASCRIPT;
function
addGammas
(
$mpars
)
{
// common to all channels
function
addGammas
(
$mpars
)
{
// common to all channels
foreach
(
$mpars
as
$p
){
foreach
(
$mpars
as
$p
){
if
(
!
is_array
(
$p
)){
if
(
!
is_array
(
$p
)){
$
pars
=
array
(
$
pars
);
$
mpars
=
array
(
$m
pars
);
}
}
break
;
break
;
}
}
...
@@ -2045,6 +2045,8 @@ function addGammas($mpars) { // common to all channels
...
@@ -2045,6 +2045,8 @@ function addGammas($mpars) { // common to all channels
$gammas
[
$pars
[
'GTAB_B'
]
>>
16
]
=
1
;
$gammas
[
$pars
[
'GTAB_B'
]
>>
16
]
=
1
;
}
}
// var_dump($gammas);
// var_dump($gammas);
log_msg
(
'Collected gammas == '
.
print_r
(
$gammas
,
1
));
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
;
...
@@ -2104,17 +2106,17 @@ log_msg("setParsFromPage($sensor_port, $page, $mask)");
...
@@ -2104,17 +2106,17 @@ log_msg("setParsFromPage($sensor_port, $page, $mask)");
$page
=
$GLOBALS
[
'configs'
][
$sensor_port
][
'defaultPage'
];
$page
=
$GLOBALS
[
'configs'
][
$sensor_port
][
'defaultPage'
];
}
}
$parToSet
=
array
();
$parToSet
=
array
();
log_msg
(
"
page =
$page
"
);
log_msg
(
"
setParsFromPage(
$sensor_port
,
$page
,
$mask
"
);
foreach
(
$GLOBALS
[
'configs'
][
$sensor_port
]
[
'groups'
]
as
$par
=>
$parMask
)
{
foreach
(
$GLOBALS
[
'configs'
][
$sensor_port
]
[
'groups'
]
as
$par
=>
$parMask
)
{
if
((
$mask
&
$parMask
)
&&
if
((
$mask
&
$parMask
)
&&
array_key_exists
(
$par
,
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'paramSets'
]
[
$page
]
)
&&
array_key_exists
(
$par
,
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'paramSets'
]
[
$page
]
)
&&
(
!
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'parTypes'
]
[
$par
]))
// / not 'text'
(
!
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'parTypes'
]
[
$par
]))
// / not 'text'
$parToSet
[
$par
]
=
myval
(
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'paramSets'
]
[
$page
]
[
$par
]
);
$parToSet
[
$par
]
=
myval
(
$GLOBALS
[
'configs'
]
[
$sensor_port
]
[
'paramSets'
]
[
$page
]
[
$par
]
);
log_msg
(
print_r
(
$parToSet
,
1
));
// log_msg( __LINE__.': par='.$par.", parMask=".parMask.", parToSet=".
print_r($parToSet,1));
}
}
// /NOTE: Important ; add gamma tables if parameters modified involve setting/ch
na
ging them
// /NOTE: Important ; add gamma tables if parameters modified involve setting/ch
an
ging them
addGammas
(
$parToSet
);
// log_msg('before gamma: parToSet == '. print_r($parToSet,1)
);
log_msg
(
'$parToSet == '
.
print_r
(
$parToSet
,
1
)
);
addGammas
(
$parToSet
);
elphel_set_P_arr
(
$sensor_port
,
$parToSet
);
elphel_set_P_arr
(
$sensor_port
,
$parToSet
);
return
$page
;
return
$page
;
}
}
...
@@ -2518,7 +2520,7 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
...
@@ -2518,7 +2520,7 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
$CORING_INDEX
=
$eyesis_mode
?
0x140014
:
0x50005
;
$CORING_INDEX
=
$eyesis_mode
?
0x140014
:
0x50005
;
$PORTRAIT
=
$eyesis_mode
?
1
:
0
;
$PORTRAIT
=
$eyesis_mode
?
1
:
0
;
$AUTOEXP_EXP_MAX
=
$eyesis_mode
?
1000
:
500000
;
$AUTOEXP_EXP_MAX
=
$eyesis_mode
?
1000
:
500000
;
$AEXP_FRACPIX
=
$eyesis_mode
?
0xf333
:
0xff80
;
// 95% : 99.8%
$AEXP_FRACPIX
=
$eyesis_mode
?
0xf333
:
0xf
df3
;
// 99.2% - sometimes 99.8% is unstable WB 0xf
f80; // 95% : 99.8%
$AEXP_LEVEL
=
$eyesis_mode
?
0xc800
:
0xf800
;
// 200 : 250
$AEXP_LEVEL
=
$eyesis_mode
?
0xc800
:
0xf800
;
// 200 : 250
$DAEMON_EN_TEMPERATURE
=
(
$eyesis_mode
>
100
)
?
1
:
0
;
// or enable it for all?
$DAEMON_EN_TEMPERATURE
=
(
$eyesis_mode
>
100
)
?
1
:
0
;
// or enable it for all?
...
...
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