Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-php-extension
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-php-extension
Commits
7dbb2566
Commit
7dbb2566
authored
Sep 23, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add elphel_num_sensors function
parent
7869cf5a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
elphel_php.c
src/ext/elphel/elphel_php.c
+8
-0
elphel_php.h
src/ext/elphel/elphel_php.h
+1
-0
No files found.
src/ext/elphel/elphel_php.c
View file @
7dbb2566
...
@@ -237,6 +237,7 @@ static zend_function_entry elphel_functions[] = {
...
@@ -237,6 +237,7 @@ static zend_function_entry elphel_functions[] = {
PHP_FE
(
elphel_histogram_get_raw
,
NULL
)
PHP_FE
(
elphel_histogram_get_raw
,
NULL
)
PHP_FE
(
elphel_histogram_get
,
NULL
)
PHP_FE
(
elphel_histogram_get
,
NULL
)
PHP_FE
(
elphel_get_state
,
NULL
)
PHP_FE
(
elphel_get_state
,
NULL
)
PHP_FE
(
elphel_num_sensors
,
NULL
)
PHP_FE
(
elphel_compressor_reset
,
NULL
)
PHP_FE
(
elphel_compressor_reset
,
NULL
)
PHP_FE
(
elphel_compressor_run
,
NULL
)
PHP_FE
(
elphel_compressor_run
,
NULL
)
...
@@ -562,6 +563,13 @@ PHP_FUNCTION(elphel_test)
...
@@ -562,6 +563,13 @@ PHP_FUNCTION(elphel_test)
RETURN_LONG
(
result
);
RETURN_LONG
(
result
);
}
}
/** Return the number of sensor ports */
PHP_FUNCTION
(
elphel_num_sensors
)
{
long
result
=
SENSOR_PORTS
;
RETURN_LONG
(
result
);
}
///NOTE: Just for compatibility with older code
///NOTE: Just for compatibility with older code
//!Get sensor state, usually 7- sensor is running, compressor is stopped, 8 - compressor is runing
//!Get sensor state, usually 7- sensor is running, compressor is stopped, 8 - compressor is runing
...
...
src/ext/elphel/elphel_php.h
View file @
7dbb2566
...
@@ -93,6 +93,7 @@ PHP_FUNCTION(elphel_histogram_get_raw);
...
@@ -93,6 +93,7 @@ PHP_FUNCTION(elphel_histogram_get_raw);
PHP_FUNCTION
(
elphel_histogram_get
);
PHP_FUNCTION
(
elphel_histogram_get
);
PHP_FUNCTION
(
elphel_get_state
);
/// compatibility with old code
PHP_FUNCTION
(
elphel_get_state
);
/// compatibility with old code
PHP_FUNCTION
(
elphel_num_sensors
);
PHP_FUNCTION
(
elphel_compressor_reset
);
/// these elphel_compressor_*() functions are for compatibility. Reset will now just stop, not actually reset
PHP_FUNCTION
(
elphel_compressor_reset
);
/// these elphel_compressor_*() functions are for compatibility. Reset will now just stop, not actually reset
PHP_FUNCTION
(
elphel_compressor_run
);
PHP_FUNCTION
(
elphel_compressor_run
);
...
...
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