Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-tools-x393
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-tools-x393
Commits
d5901897
Commit
d5901897
authored
Jul 10, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correctly processing split files, modified filenames for sorting
parent
b46a9a1d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
244 additions
and
124 deletions
+244
-124
extract_images_tiff.php
extract_images_tiff.php
+236
-117
int_ssd_download.py
int_ssd_download.py
+1
-1
x393.py
x393.py
+7
-6
No files found.
extract_images_tiff.php
View file @
d5901897
This diff is collapsed.
Click to expand it.
int_ssd_download.py
View file @
d5901897
...
...
@@ -147,7 +147,7 @@ for i in range(len(cams)):
if
args
.
n
==
0
:
data_size_blocks
=
pc
.
read_camogm_disk_file_blocks
(
"/dev/"
+
p
[
1
][
0
:
-
1
]
+
"1"
,
args
.
file_end
)
data_skip_blocks
=
pc
.
read_camogm_disk_file_blocks
(
"/dev/"
+
p
[
1
][
0
:
-
1
]
+
"1"
,
args
.
file_start
)
data_size_blocks
-=
data_skip_blocks
data_size_blocks
-=
data_skip_blocks
# before it included skipped !
else
:
data_size_blocks
=
args
.
n
data_skip_blocks
=
args
.
skip
...
...
x393.py
View file @
d5901897
...
...
@@ -260,7 +260,8 @@ class PC():
if
not
os
.
path
.
isdir
(
dirname
):
os
.
mkdir
(
dirname
)
for
i
in
range
(
0
,
dl_n
+
dl_skip
):
fname
=
dirname
+
"/"
+
"file_"
+
str
(
i
)
+
".img"
# fname = dirname+"/"+"file_"+str(i)+".img"
fname
=
"
%
s/file_
%03
d.img"
%
(
dirname
,
i
)
#dirname+"/"+"file_"+str(i)+".img"
skip
=
i
*
(
dl_bc
-
1
)
if
i
>=
dl_skip
:
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
dl_bs
)
+
"M count="
+
str
(
dl_bc
)
+
" skip="
+
str
(
skip
))
...
...
@@ -280,12 +281,12 @@ class PC():
os
.
mkdir
(
dirname
)
num_file
=
0
# optional first file to align skip to chunk_blocks, 1 block at a time
if
(
blocks_skip
>
0
)
and
((
blocks_skip
//
chunk_blocks
)
>
0
):
bwrite
=
chunk_blocks
-
(
blocks_skip
//
chunk_blocks
)
if
(
blocks_skip
>
0
)
and
((
blocks_skip
%
chunk_blocks
)
>
0
):
bwrite
=
chunk_blocks
-
(
blocks_skip
%
chunk_blocks
)
if
(
bwrite
>
blocks_load
):
bwrite
=
blocks_load
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
print
(
"Aligning skip to chunks,
writ
ing
%
d
%
d-byte blocks (skipping
%
d blocks) to
%
s"
%
(
bwrite
,
block_size
,
blocks_skip
,
fname
))
print
(
"Aligning skip to chunks,
download
ing
%
d
%
d-byte blocks (skipping
%
d blocks) to
%
s"
%
(
bwrite
,
block_size
,
blocks_skip
,
fname
))
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
block_size
)
+
" count="
+
str
(
bwrite
)
+
" skip="
+
str
(
blocks_skip
))
blocks_skip
+=
bwrite
blocks_load
-=
bwrite
...
...
@@ -297,7 +298,7 @@ class PC():
if
(
chunks_write
>
file_chunks
):
chunks_write
=
file_chunks
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
print
(
"
Writ
ing
%
d
%
d-byte chunks, skipping
%
d chunks to
%
s"
%
(
chunks_write
,
chunk_bytes
,
chunks_skip
,
fname
))
print
(
"
Download
ing
%
d
%
d-byte chunks, skipping
%
d chunks to
%
s"
%
(
chunks_write
,
chunk_bytes
,
chunks_skip
,
fname
))
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
chunk_bytes
)
+
" count="
+
str
(
chunks_write
)
+
" skip="
+
str
(
chunks_skip
))
bwrite
=
chunks_write
*
chunk_blocks
blocks_skip
+=
bwrite
...
...
@@ -306,7 +307,7 @@ class PC():
# optionally write the remainder (< chunk), 1 block at a time
if
(
blocks_load
>
0
):
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
print
(
"
Writ
ing last
%
d
%
d-byte blocks, skipping
%
d blocks to
%
s"
%
(
blocks_load
,
block_size
,
blocks_skip
,
fname
))
print
(
"
Download
ing last
%
d
%
d-byte blocks, skipping
%
d blocks to
%
s"
%
(
blocks_load
,
block_size
,
blocks_skip
,
fname
))
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
block_size
)
+
" count="
+
str
(
blocks_load
)
+
" skip="
+
str
(
blocks_skip
))
...
...
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