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
885ccee2
Commit
885ccee2
authored
May 04, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifying for Lepton
parent
e4fd597d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
autocampars.php
src/autocampars.php
+16
-3
No files found.
src/autocampars.php
View file @
885ccee2
...
@@ -668,7 +668,7 @@ function detect_camera(){
...
@@ -668,7 +668,7 @@ function detect_camera(){
log_msg
(
'Current state: '
.
$GLOBALS
[
'camera_state_arr'
][
'state'
]);
log_msg
(
'Current state: '
.
$GLOBALS
[
'camera_state_arr'
][
'state'
]);
}
}
// Now IPs of slave cameras are know - reboot them (will exit anyway)
// Now IPs of slave cameras are know
n
- reboot them (will exit anyway)
if
(
$GLOBALS
[
'camera_state_arr'
][
'state'
]
==
'REBOOT'
)
{
if
(
$GLOBALS
[
'camera_state_arr'
][
'state'
]
==
'REBOOT'
)
{
reboot_all_if_master
();
// will exit anyway (do nothing if not master), exit anyway
reboot_all_if_master
();
// will exit anyway (do nothing if not master), exit anyway
}
}
...
@@ -891,6 +891,10 @@ function detect_camera(){
...
@@ -891,6 +891,10 @@ function detect_camera(){
}
}
case
'SENSORS_DETECTED'
:
case
'SENSORS_DETECTED'
:
// Program trigger modes (inactive), stop and reset command sequencers
// Program trigger modes (inactive), stop and reset command sequencers
if
(
$GLOBALS
[
'camera_state_arr'
][
'is_lepton35'
]){
log_msg
(
'Nothing currently to do here for Lepton 3.5 sensors'
);
break
;
}
foreach
(
$GLOBALS
[
'ports'
]
as
$port
)
{
foreach
(
$GLOBALS
[
'ports'
]
as
$port
)
{
if
(
$port
==
$GLOBALS
[
'master_port'
]){
if
(
$port
==
$GLOBALS
[
'master_port'
]){
elphel_set_P_value
(
$port
,
ELPHEL_TRIG_MASTER
,
$GLOBALS
[
'master_port'
],
ELPHEL_CONST_FRAME_IMMED
);
elphel_set_P_value
(
$port
,
ELPHEL_TRIG_MASTER
,
$GLOBALS
[
'master_port'
],
ELPHEL_CONST_FRAME_IMMED
);
...
@@ -2826,6 +2830,7 @@ function curl_multi_finish($data, $use_xml=true, $ntry=0, $echo = false) {
...
@@ -2826,6 +2830,7 @@ function curl_multi_finish($data, $use_xml=true, $ntry=0, $echo = false) {
}
}
function
createDefaultConfig
(
$version
,
$port
,
$multisensor
=
false
,
$eyesis_mode
=
0
)
{
// / 0 - not eyesis, 1-3 - camera number
function
createDefaultConfig
(
$version
,
$port
,
$multisensor
=
false
,
$eyesis_mode
=
0
)
{
// / 0 - not eyesis, 1-3 - camera number
$lepton35
=
$GLOBALS
[
'camera_state_arr'
][
'is_lepton35'
];
$SENSOR_RUN
=
ELPHEL_CONST_SENSOR_RUN_CONT
;
// / turn on sensor in continuous mode
$SENSOR_RUN
=
ELPHEL_CONST_SENSOR_RUN_CONT
;
// / turn on sensor in continuous mode
$COMPRESSOR_RUN
=
ELPHEL_CONST_COMPRESSOR_RUN_CONT
;
// / run compressor in continuous mode
$COMPRESSOR_RUN
=
ELPHEL_CONST_COMPRESSOR_RUN_CONT
;
// / run compressor in continuous mode
$HISTMODE_Y
=
ELPHEL_CONST_TASKLET_HIST_ONCE
;
$HISTMODE_Y
=
ELPHEL_CONST_TASKLET_HIST_ONCE
;
...
@@ -2833,7 +2838,11 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
...
@@ -2833,7 +2838,11 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
$SCALES_CTL
=
ELPHEL_CONST_CSCALES_CTL_NORMAL
;
$SCALES_CTL
=
ELPHEL_CONST_CSCALES_CTL_NORMAL
;
// /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?
if
(
$lepton35
){
$TRIG
=
0
;
}
else
{
$TRIG
=
4
;
// $multisensor ? 4 : 0;
$TRIG
=
4
;
// $multisensor ? 4 : 0;
}
$appmode
=
get_application_mode
();
$appmode
=
get_application_mode
();
if
((
$appmode
&
0xf0000
)
!=
0
){
if
((
$appmode
&
0xf0000
)
!=
0
){
...
@@ -2873,7 +2882,11 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
...
@@ -2873,7 +2882,11 @@ function createDefaultConfig($version, $port, $multisensor = false, $eyesis_mode
$HISTWND_RHEIGHT
=
0x8000
;
$HISTWND_RHEIGHT
=
0x8000
;
$HISTWND_RLEFT
=
0x8000
;
$HISTWND_RLEFT
=
0x8000
;
$HISTWND_RTOP
=
0x8000
;
$HISTWND_RTOP
=
0x8000
;
if
(
$lepton35
)
{
$COLOR
=
15
;
// raw
}
else
{
$COLOR
=
0
;
$COLOR
=
0
;
}
//old:
//old:
//$SENSOR_PHASE = $multisensor ? 0x55 : 0x15;
//$SENSOR_PHASE = $multisensor ? 0x55 : 0x15;
//new:
//new:
...
...
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