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
8040cfa1
Commit
8040cfa1
authored
Jul 10, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
naming bug
parent
d5901897
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
x393.py
x393.py
+7
-3
No files found.
x393.py
View file @
8040cfa1
...
...
@@ -285,7 +285,9 @@ class PC():
bwrite
=
chunk_blocks
-
(
blocks_skip
%
chunk_blocks
)
if
(
bwrite
>
blocks_load
):
bwrite
=
blocks_load
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
# fname = dirname+"/"+"file_"+str(num_file)+".img"
fname
=
"
%
s/file_
%03
d.img"
%
(
dirname
,
num_file
)
#dirname+"/"+"file_"+str(num_file)+".img"
print
(
"Aligning skip to chunks, downloading
%
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
...
...
@@ -297,7 +299,8 @@ class PC():
chunks_skip
=
blocks_skip
//
chunk_blocks
# should be already multiple of chunks
if
(
chunks_write
>
file_chunks
):
chunks_write
=
file_chunks
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
# fname = dirname+"/"+"file_"+str(num_file)+".img"
fname
=
"
%
s/file_
%03
d.img"
%
(
dirname
,
num_file
)
#dirname+"/"+"file_"+str(num_file)+".img"
print
(
"Downloading
%
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
...
...
@@ -306,7 +309,8 @@ class PC():
num_file
+=
1
# optionally write the remainder (< chunk), 1 block at a time
if
(
blocks_load
>
0
):
fname
=
dirname
+
"/"
+
"file_"
+
str
(
num_file
)
+
".img"
# fname = dirname+"/"+"file_"+str(num_file)+".img"
fname
=
"
%
s/file_
%03
d.img"
%
(
dirname
,
num_file
)
#dirname+"/"+"file_"+str(num_file)+".img"
print
(
"Downloading 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