Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
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-web-393
Commits
d5ba77fb
Commit
d5ba77fb
authored
Sep 02, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging with drivers
parent
dab23f58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
parsedit.php
src/php_top/parsedit.php
+13
-8
No files found.
src/php_top/parsedit.php
View file @
d5ba77fb
...
@@ -124,8 +124,8 @@
...
@@ -124,8 +124,8 @@
$sensor_port
=
0
;
/// TODO: NC393 - add sensor port control, initially will use $sensor_port=0 for all php functions that require it
$sensor_port
=
0
;
/// TODO: NC393 - add sensor port control, initially will use $sensor_port=0 for all php functions that require it
$autocampars
=
'/www/pages/autocampars.php'
;
$autocampars
=
'/www/pages/autocampars.php'
;
$descriptions
=
getParDescriptions
(
$autocampars
);
$descriptions
=
getParDescriptions
(
$autocampars
);
$default_ahead
=
3
;
$default_ahead
=
5
;
//
3;
$maxahead
=
6
;
/// maximal ahead of the current frame that tasks can currently be set to driver;
$maxahead
=
6
;
/// maximal ahead of the current frame that tasks can currently be set to driver;
//NC393 - is it the same?
$minahead
=
4
;
/// skip to frame $minahead from the soonest next task before programming
$minahead
=
4
;
/// skip to frame $minahead from the soonest next task before programming
$brief
=
true
;
$brief
=
true
;
$ahead_separator
=
'*'
;
$ahead_separator
=
'*'
;
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
$imglink
=
"bimg"
;
///It was "img" - faster, but image may get corrupted if buffer is overrun before it is trasferred (network congestion)
$imglink
=
"bimg"
;
///It was "img" - faster, but image may get corrupted if buffer is overrun before it is trasferred (network congestion)
$defaultImgScale
=
0.2
;
/// 20% image size
$defaultImgScale
=
0.2
;
/// 20% image size
$defaultImagesPerRow
=
3
;
$defaultImagesPerRow
=
3
;
$defaultImagesNumber
=
9
;
$defaultImagesNumber
=
9
;
// 12
$isPost
=
$_SERVER
[
"REQUEST_METHOD"
]
==
"POST"
;
$isPost
=
$_SERVER
[
"REQUEST_METHOD"
]
==
"POST"
;
$ignoreVals
=
$isPost
;
$ignoreVals
=
$isPost
;
$imagesNumber
=
$defaultImagesNumber
;
$imagesNumber
=
$defaultImagesNumber
;
...
@@ -500,7 +500,7 @@ USAGE;
...
@@ -500,7 +500,7 @@ USAGE;
/// show table with last acquired images and meta data
/// show table with last acquired images and meta data
/// TODO: show ch
na
ged parameters for those frames? ***
/// TODO: show ch
an
ged parameters for those frames? ***
function
showImgData
(
$meta
,
$skipped
,
$prev
,
$imgScale
,
$done
)
{
function
showImgData
(
$meta
,
$skipped
,
$prev
,
$imgScale
,
$done
)
{
global
$imgsrv
,
$imglink
;
global
$imgsrv
,
$imglink
;
$width
=
$meta
[
'meta'
][
'width'
];
$width
=
$meta
[
'meta'
][
'width'
];
...
@@ -577,12 +577,14 @@ echo "</pre>";
...
@@ -577,12 +577,14 @@ echo "</pre>";
///TODO:if $todo is provided in $_GET - try to find the correct images even if they are not the latest
///TODO:if $todo is provided in $_GET - try to find the correct images even if they are not the latest
function
showLastImages
(
$numImg
,
$imagesPerRow
,
$imgScale
)
{
function
showLastImages
(
$numImg
,
$imagesPerRow
,
$imgScale
)
{
elphel_update_exif
();
// just for testing
//
elphel_update_exif(); // just for testing
$done
=
decodeTodo
(
$_GET
[
'done'
]
);
$done
=
decodeTodo
(
$_GET
[
'done'
]
);
// $this_exif=elphel_get_exif_elphel(0);
// $this_exif=elphel_get_exif_elphel(0);
$circbuf_pointers
=
elphel_get_circbuf_pointers
(
$GLOBALS
[
sensor_port
],
1
);
$circbuf_pointers
=
elphel_get_circbuf_pointers
(
$GLOBALS
[
sensor_port
],
1
);
echo
"<!--"
;
echo
"<!--"
;
var_dump
(
$circbuf_pointers
);
var_dump
(
$circbuf_pointers
);
var_dump
(
$done
);
var_dump
(
$numImg
);
echo
"-->"
;
echo
"-->"
;
$framesAgo
=
0
;
$framesAgo
=
0
;
// echo "<pre>\n";
// echo "<pre>\n";
...
@@ -590,6 +592,7 @@ function showLastImages($numImg, $imagesPerRow, $imgScale) {
...
@@ -590,6 +592,7 @@ function showLastImages($numImg, $imagesPerRow, $imgScale) {
if
(
$done
)
{
if
(
$done
)
{
end
(
$done
);
end
(
$done
);
$lastFrameNumber
=
key
(
$done
);
$lastFrameNumber
=
key
(
$done
);
// $lastFrameNumber = key ( $done ) + 9; // NC393 debugging
$cur_ptr
=
current
(
$circbuf_pointers
);
$cur_ptr
=
current
(
$circbuf_pointers
);
while
(
$cur_ptr
[
'frame'
]
>
$lastFrameNumber
)
{
while
(
$cur_ptr
[
'frame'
]
>
$lastFrameNumber
)
{
if
(
!
prev
(
$circbuf_pointers
))
{
// / failed to find the right frame in circbuf - probably overwritten
if
(
!
prev
(
$circbuf_pointers
))
{
// / failed to find the right frame in circbuf - probably overwritten
...
@@ -864,7 +867,7 @@ function applyPost($todo,$noFinalWait=false) {
...
@@ -864,7 +867,7 @@ function applyPost($todo,$noFinalWait=false) {
$frame_now
=
$frame_since
+
$frame_zero
;
$frame_now
=
$frame_since
+
$frame_zero
;
// $frame_now=$frame_since+$frame_zero+2; // NC393: adding 2 extra
// $frame_now=$frame_since+$frame_zero+2; // NC393: adding 2 extra
if
(
$waitingEnabled
)
{
if
(
$waitingEnabled
)
{
$frame_now
=
$frame_since
+
$frame_zero
;
//
$frame_now=$frame_since+$frame_zero;
if
(
$showSeqMode
>
0
)
{
printf
(
"waiting frame %d (0x%x) ... "
,
$frame_now
,
$frame_now
);
ob_flush
();
flush
();}
if
(
$showSeqMode
>
0
)
{
printf
(
"waiting frame %d (0x%x) ... "
,
$frame_now
,
$frame_now
);
ob_flush
();
flush
();}
elphel_wait_frame_abs
(
$GLOBALS
[
sensor_port
],
$frame_now
);
elphel_wait_frame_abs
(
$GLOBALS
[
sensor_port
],
$frame_now
);
if
(
$showSeqMode
>
0
)
{
printf
(
"done (%d)
\n
"
,
elphel_get_frame
(
$GLOBALS
[
sensor_port
]));
ob_flush
();
flush
();}
if
(
$showSeqMode
>
0
)
{
printf
(
"done (%d)
\n
"
,
elphel_get_frame
(
$GLOBALS
[
sensor_port
]));
ob_flush
();
flush
();}
...
@@ -873,8 +876,8 @@ function applyPost($todo,$noFinalWait=false) {
...
@@ -873,8 +876,8 @@ function applyPost($todo,$noFinalWait=false) {
elphel_set_P_arr
(
$GLOBALS
[
sensor_port
],
$pgmpars
,
$frame_zero
+
$since
,
ELPHEL_CONST_FRAMEPAIR_FORCE_NEWPROC
);
/// Are these flags needed?
elphel_set_P_arr
(
$GLOBALS
[
sensor_port
],
$pgmpars
,
$frame_zero
+
$since
,
ELPHEL_CONST_FRAMEPAIR_FORCE_NEWPROC
);
/// Are these flags needed?
}
}
if
(
!
$noFinalWait
)
{
if
(
!
$noFinalWait
)
{
//
$frame_now=$since+$frame_zero+1; /// wait just 1 frame longer that the target of the last command in $todo
$frame_now
=
$since
+
$frame_zero
+
1
;
/// wait just 1 frame longer that the target of the last command in $todo
$frame_now
=
$since
+
$frame_zero
+
2
;
/// wait just 1 frame longer that the target of the last command in $todo
// $frame_now=$since+$frame_zero+4
; /// wait just 1 frame longer that the target of the last command in $todo
// echo "since=$since\n"; ob_flush(); flush();
// echo "since=$since\n"; ob_flush(); flush();
if
(
$showSeqMode
>
0
)
{
printf
(
"waiting frame %d (0x%x) ... "
,
$frame_now
,
$frame_now
);
ob_flush
();
flush
();}
if
(
$showSeqMode
>
0
)
{
printf
(
"waiting frame %d (0x%x) ... "
,
$frame_now
,
$frame_now
);
ob_flush
();
flush
();}
if
(
$waitingEnabled
)
{
if
(
$waitingEnabled
)
{
...
@@ -887,6 +890,8 @@ function applyPost($todo,$noFinalWait=false) {
...
@@ -887,6 +890,8 @@ function applyPost($todo,$noFinalWait=false) {
usleep
(
$timeout_step
);
usleep
(
$timeout_step
);
}
}
}
}
// } else { // just debugging - still waiting
// elphel_skip_frames($GLOBALS [sensor_port],8); // skip 8 frames - debugging NC393 - no differnce!
}
}
if
(
$showSeqMode
>
0
)
{
printf
(
"done (%d, 0x%x)
\n
"
,
elphel_get_frame
(
$GLOBALS
[
sensor_port
]),
elphel_get_frame
(
$GLOBALS
[
sensor_port
]));
ob_flush
();
flush
();}
if
(
$showSeqMode
>
0
)
{
printf
(
"done (%d, 0x%x)
\n
"
,
elphel_get_frame
(
$GLOBALS
[
sensor_port
]),
elphel_get_frame
(
$GLOBALS
[
sensor_port
]));
ob_flush
();
flush
();}
if
(
$showSeqMode
>
0
)
echo
"</pre>"
;
if
(
$showSeqMode
>
0
)
echo
"</pre>"
;
...
...
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