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
20bec9b8
Commit
20bec9b8
authored
Mar 27, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added driver disable flag (empty file named '/etc/elphel393/disable_driver')
parent
97b18b82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
autocampars.php
src/autocampars.php
+12
-2
No files found.
src/autocampars.php
View file @
20bec9b8
...
...
@@ -261,6 +261,8 @@ $GLOBALS['configs'] = array();
$GLOBALS
[
'init'
]
=
false
;
$GLOBALS
[
'daemon'
]
=
false
;
$GLOBALS
[
'driver_disabler'
]
=
$GLOBALS
[
'configDir'
]
.
"/disable_driver"
;
log_open
();
...
...
@@ -1415,11 +1417,19 @@ function get_application_mode() {
if
(
$xml
===
false
)
{
log_msg
(
"10389 board not present"
);
}
else
{
log_msg
(
'Application - '
.
((
string
)
$xml
->
app
)
.
', mode: '
.
((
string
)
$xml
->
mode
)
.
"
\n
"
,
3
);
// disable driver here
if
(
is_file
(
$GLOBALS
[
'driver_disabler'
])){
$mode
=
0
;
}
else
{
$mode
=
intval
(
$xml
->
mode
);
}
log_msg
(
'Application - '
.
((
string
)
$xml
->
app
)
.
', mode: '
.
((
string
)
$mode
)
.
"
\n
"
,
3
);
$GLOBALS
[
'camera_state_arr'
]
[
'rev10389'
]
=
''
.
$xml
->
rev
;
if
(((
string
)
$xml
->
app
)
!=
''
)
{
$GLOBALS
[
'camera_state_arr'
]
[
'application'
]
=
''
.
$xml
->
app
;
$GLOBALS
[
'camera_state_arr'
]
[
'mode'
]
=
intval
(
$xml
->
mode
)
;
$GLOBALS
[
'camera_state_arr'
]
[
'mode'
]
=
$mode
;
}
}
write_php_ini
(
$GLOBALS
[
'camera_state_arr'
],
$GLOBALS
[
'camera_state_path'
]
);
...
...
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