Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gopro
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tony Mai
gopro
Commits
e067c977
Commit
e067c977
authored
Aug 05, 2019
by
Tony Mai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
afa27fda
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
281 additions
and
185 deletions
+281
-185
gui.py
python/gui.py
+239
-159
wireless_copy_files_to_nfs.py
python/wireless_copy_files_to_nfs.py
+42
-26
No files found.
python/gui.py
View file @
e067c977
This diff is collapsed.
Click to expand it.
python/wireless_copy_files_to_nfs.py
View file @
e067c977
...
@@ -87,6 +87,9 @@ def run(folder_dst=None,ptr=None):
...
@@ -87,6 +87,9 @@ def run(folder_dst=None,ptr=None):
#msg("Restart wlan1...")
#os.system("systemctl daemon-reload")
#os.system("systemctl restart dhcpcd")
msg
(
"Checking wlan1..."
)
msg
(
"Checking wlan1..."
)
try
:
try
:
...
@@ -97,6 +100,16 @@ def run(folder_dst=None,ptr=None):
...
@@ -97,6 +100,16 @@ def run(folder_dst=None,ptr=None):
gpCam
=
GoProCamera
.
GoPro
()
gpCam
=
GoProCamera
.
GoPro
()
try
:
gpCam
.
pair
(
usepin
=
False
)
#gpCam.pair(usepin=True)
except
:
msg
(
"Cannot Pair to Gopro. Exit..."
)
return
#if ping(gpCam.ip_addr):
#if ping(gpCam.ip_addr):
# msg ("Ping gopro ("+gpCam.ip_addr+") failed. Exit...")
# msg ("Ping gopro ("+gpCam.ip_addr+") failed. Exit...")
# return
# return
...
@@ -104,9 +117,6 @@ def run(folder_dst=None,ptr=None):
...
@@ -104,9 +117,6 @@ def run(folder_dst=None,ptr=None):
# msg ("Ping gopro ok.")
# msg ("Ping gopro ok.")
gpCam
.
pair
(
usepin
=
False
)
#gpCam.pair(usepin=True)
os
.
system
(
"mkdir "
+
folder_dst
)
os
.
system
(
"mkdir "
+
folder_dst
)
...
@@ -121,12 +131,17 @@ def run(folder_dst=None,ptr=None):
...
@@ -121,12 +131,17 @@ def run(folder_dst=None,ptr=None):
start_time
=
time
.
time
()
start_time
=
time
.
time
()
msg
(
"Start time :"
+
str
(
localtime
))
msg
(
"Start time :"
+
str
(
localtime
))
camera_info
(
gpCam
)
camera_info
(
gpCam
)
data
=
gpCam
.
listMedia
(
True
,
True
)
data
=
gpCam
.
listMedia
(
True
,
True
)
for
i
in
range
(
len
(
data
)):
for
i
in
range
(
len
(
data
)):
msg
(
str
(
data
[
i
]))
msg
(
str
(
data
[
i
]))
#data=gpCam.listMedia(True,True)
#data=gpCam.listMedia(True,True)
try
:
for
i
in
data
:
for
i
in
data
:
folder
=
i
[
0
]
folder
=
i
[
0
]
if
not
os
.
path
.
exists
(
folder_dst
+
"/"
+
folder
):
if
not
os
.
path
.
exists
(
folder_dst
+
"/"
+
folder
):
...
@@ -150,7 +165,8 @@ def run(folder_dst=None,ptr=None):
...
@@ -150,7 +165,8 @@ def run(folder_dst=None,ptr=None):
thm_file
=
re
.
sub
(
".MP4"
,
".THM"
,
mp4_file
)
thm_file
=
re
.
sub
(
".MP4"
,
".THM"
,
mp4_file
)
#msg("copy "+folder+"/"+thm_file+" to "+folder_dst);
#msg("copy "+folder+"/"+thm_file+" to "+folder_dst);
gpCam
.
downloadMedia
(
folder
,
thm_file
,
folder_dst
+
"/"
+
folder
+
"/"
+
thm_file
)
gpCam
.
downloadMedia
(
folder
,
thm_file
,
folder_dst
+
"/"
+
folder
+
"/"
+
thm_file
)
except
:
msg
(
"Fail copy to "
+
folder_dst
);
msg
(
"Done"
)
msg
(
"Done"
)
...
...
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