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
aeb17752
Commit
aeb17752
authored
Nov 05, 2025
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missing commits
parent
dccc15bf
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
464 additions
and
1 deletion
+464
-1
extract_images_tiff_utc.php
extract_images_tiff_utc.php
+449
-0
x393.py
x393.py
+15
-1
No files found.
extract_images_tiff_utc.php
0 → 100755
View file @
aeb17752
This diff is collapsed.
Click to expand it.
x393.py
View file @
aeb17752
...
@@ -173,12 +173,14 @@ class Camera:
...
@@ -173,12 +173,14 @@ class Camera:
shout
(
self
.
sshcmd
+
" 'echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module'"
)
shout
(
self
.
sshcmd
+
" 'echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module'"
)
def
read_camogm_disk_file_blocks
(
self
,
part
,
fname
=
"camogm.disk"
):
def
read_camogm_disk_file_blocks
(
self
,
part
,
fname
=
"camogm.disk"
):
print
(
"camera: read_camogm_disk_file_blocks() "
+
fname
+
"self.scpcmd="
+
self
.
scpcmd
)
result
=
0
result
=
0
tmp_mount_point
=
tempfile
.
mkdtemp
()
tmp_mount_point
=
tempfile
.
mkdtemp
()
print
(
self
.
scpcmd
+
"/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
print
(
self
.
scpcmd
+
"/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
shout
(
self
.
scpcmd
+
"/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
shout
(
self
.
scpcmd
+
"/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
try
:
try
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
print
(
"Opened "
+
tmp_mount_point
+
"/"
+
fname
)
data
=
myfile
.
readlines
()
data
=
myfile
.
readlines
()
if
len
(
data
)
==
2
:
if
len
(
data
)
==
2
:
l2
=
data
[
1
]
l2
=
data
[
1
]
...
@@ -210,11 +212,13 @@ class PC():
...
@@ -210,11 +212,13 @@ class PC():
# mounts partition (/dev/sd?1), reads camogm.disk file
# mounts partition (/dev/sd?1), reads camogm.disk file
# returns the download size from raw partition ((/dev/sd?2))
# returns the download size from raw partition ((/dev/sd?2))
def
read_camogm_disk_file
(
self
,
part
,
fname
=
"camogm.disk"
):
def
read_camogm_disk_file
(
self
,
part
,
fname
=
"camogm.disk"
):
print
(
"read_camogm_disk_file() "
+
fname
)
result
=
0
result
=
0
tmp_mount_point
=
tempfile
.
mkdtemp
()
tmp_mount_point
=
tempfile
.
mkdtemp
()
print
(
"mounting "
+
part
+
" to "
+
tmp_mount_point
)
print
(
"mounting "
+
part
+
" to "
+
tmp_mount_point
)
shout
(
"sudo mount "
+
part
+
" "
+
tmp_mount_point
)
shout
(
"sudo mount "
+
part
+
" "
+
tmp_mount_point
)
print
(
"mounted "
+
part
+
" to "
+
tmp_mount_point
)
time
.
sleep
(
1
)
try
:
try
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
data
=
myfile
.
readlines
()
data
=
myfile
.
readlines
()
...
@@ -256,13 +260,20 @@ class PC():
...
@@ -256,13 +260,20 @@ class PC():
Returns block offset from the start of partition to the current LBA pointer
Returns block offset from the start of partition to the current LBA pointer
"""
"""
def
read_camogm_disk_file_blocks
(
self
,
part
,
fname
=
"camogm.disk"
):
def
read_camogm_disk_file_blocks
(
self
,
part
,
fname
=
"camogm.disk"
):
# print("PC: read_camogm_disk_file_blocks() "+fname)
result
=
0
result
=
0
tmp_mount_point
=
tempfile
.
mkdtemp
()
tmp_mount_point
=
tempfile
.
mkdtemp
()
print
(
"mounting "
+
part
+
" to "
+
tmp_mount_point
)
print
(
"mounting "
+
part
+
" to "
+
tmp_mount_point
)
shout
(
"sudo mount "
+
part
+
" "
+
tmp_mount_point
)
shout
(
"sudo mount "
+
part
+
" "
+
tmp_mount_point
)
print
(
"mounted "
+
part
+
" to "
+
tmp_mount_point
)
time
.
sleep
(
1
)
# print ("Opening "+tmp_mount_point+"/"+fname)
# time.sleep(100);
try
:
try
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
# print("reading "+tmp_mount_point+"/"+fname)
data
=
myfile
.
readlines
()
data
=
myfile
.
readlines
()
# print("len(data)= "+str(len(data)))
if
len
(
data
)
==
2
:
if
len
(
data
)
==
2
:
l2
=
data
[
1
]
l2
=
data
[
1
]
pointers
=
l2
.
split
(
"
\t
"
)
pointers
=
l2
.
split
(
"
\t
"
)
...
@@ -284,7 +295,9 @@ class PC():
...
@@ -284,7 +295,9 @@ class PC():
shout
(
"scp root@"
+
ip
+
":/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
shout
(
"scp root@"
+
ip
+
":/mnt/"
+
part
+
"/"
+
fname
+
" "
+
tmp_mount_point
)
try
:
try
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
with
open
(
tmp_mount_point
+
"/"
+
fname
,
"r"
)
as
myfile
:
# print("reading "+tmp_mount_point+"/"+fname)
data
=
myfile
.
readlines
()
data
=
myfile
.
readlines
()
# print("len(data)= "+str(len(data)))
if
len
(
data
)
==
2
:
if
len
(
data
)
==
2
:
l2
=
data
[
1
]
l2
=
data
[
1
]
pointers
=
l2
.
split
(
"
\t
"
)
pointers
=
l2
.
split
(
"
\t
"
)
...
@@ -371,6 +384,7 @@ class PC():
...
@@ -371,6 +384,7 @@ class PC():
# 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"
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
))
print
(
"Downloading
%
d
%
d-byte chunks, skipping
%
d chunks to
%
s"
%
(
chunks_write
,
chunk_bytes
,
chunks_skip
,
fname
))
print
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
chunk_bytes
)
+
" count="
+
str
(
chunks_write
)
+
" skip="
+
str
(
chunks_skip
))
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
chunk_bytes
)
+
" count="
+
str
(
chunks_write
)
+
" skip="
+
str
(
chunks_skip
))
shout
(
"sudo dd if="
+
part
+
" "
+
" of="
+
fname
+
" bs="
+
str
(
chunk_bytes
)
+
" count="
+
str
(
chunks_write
)
+
" skip="
+
str
(
chunks_skip
))
bwrite
=
chunks_write
*
chunk_blocks
bwrite
=
chunks_write
*
chunk_blocks
blocks_skip
+=
bwrite
blocks_skip
+=
bwrite
...
...
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