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
ec4e33df
Commit
ec4e33df
authored
Jul 25, 2019
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed formatting in debug printing
parent
35bca15d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
elphel_php.c
src/ext/elphel/elphel_php.c
+4
-4
No files found.
src/ext/elphel/elphel_php.c
View file @
ec4e33df
...
@@ -1313,11 +1313,11 @@ PHP_FUNCTION(elphel_histogram_get_raw)
...
@@ -1313,11 +1313,11 @@ PHP_FUNCTION(elphel_histogram_get_raw)
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
LSEEK_HIST_NEEDED
+
(
needed
&
0xff0
),
SEEK_END
);
/// mask out needed raw (fpga) bits
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
LSEEK_HIST_NEEDED
+
(
needed
&
0xff0
),
SEEK_END
);
/// mask out needed raw (fpga) bits
index
=
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
frame
,
SEEK_SET
);
/// request histograms for frame=frame, wait until available if needed
index
=
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
frame
,
SEEK_SET
);
/// request histograms for frame=frame, wait until available if needed
if
(
index
<
0
)
{
if
(
index
<
0
)
{
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Requested histograms are not available (frame=%d, needed=0x%x)"
,
frame
,
needed
);
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Requested histograms are not available (frame=%
l
d, needed=0x%x)"
,
frame
,
needed
);
RETURN_NULL
();
RETURN_NULL
();
}
}
if
(
index
>=
total_hist_entries
)
{
if
(
index
>=
total_hist_entries
)
{
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Internal error: frame=%
d, index=%d >= %
d (total_hist_entries)"
,
frame
,
index
,
total_hist_entries
);
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Internal error: frame=%
ld, index=%ld >= %l
d (total_hist_entries)"
,
frame
,
index
,
total_hist_entries
);
RETURN_NULL
();
RETURN_NULL
();
}
}
packed_histogram_structure
=
(
char
*
)
emalloc
(
sizeof
(
struct
histogram_stuct_t
));
packed_histogram_structure
=
(
char
*
)
emalloc
(
sizeof
(
struct
histogram_stuct_t
));
...
@@ -1375,11 +1375,11 @@ PHP_FUNCTION(elphel_histogram_get)
...
@@ -1375,11 +1375,11 @@ PHP_FUNCTION(elphel_histogram_get)
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
LSEEK_HIST_NEEDED
+
(
needed
&
0xff0
),
SEEK_END
);
// / mask out needed raw (fpga) bits
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
LSEEK_HIST_NEEDED
+
(
needed
&
0xff0
),
SEEK_END
);
// / mask out needed raw (fpga) bits
index
=
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
frame
,
SEEK_SET
);
/// request histograms for frame=frame, wait until available if needed
index
=
lseek
(
ELPHEL_G
(
fd_histogram_cache
),
frame
,
SEEK_SET
);
/// request histograms for frame=frame, wait until available if needed
if
(
index
<
0
)
{
if
(
index
<
0
)
{
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Requested histograms are not available (frame=%d, needed=0x%x)"
,
frame
,
needed
);
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Requested histograms are not available (frame=%
l
d, needed=0x%x)"
,
frame
,
needed
);
RETURN_NULL
();
RETURN_NULL
();
}
}
if
(
index
>=
total_hist_entries
)
{
if
(
index
>=
total_hist_entries
)
{
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Internal error: frame=%
d, index=%d >= %
d (total_hist_entries)"
,
frame
,
index
,
total_hist_entries
);
php_error_docref
(
NULL
TSRMLS_CC
,
E_ERROR
,
"Internal error: frame=%
ld, index=%ld >= %l
d (total_hist_entries)"
,
frame
,
index
,
total_hist_entries
);
RETURN_NULL
();
RETURN_NULL
();
}
}
...
...
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