Skip to content
This repository has been archived by the owner on Mar 2, 2025. It is now read-only.

Commit

Permalink
Add fix for keepalive() udp call
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradIT committed Mar 19, 2017
1 parent 0aac588 commit 867b2a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goprocam/GoProCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def __init__(self, camera="detect", mac_address="AA:BB:CC:DD:EE:FF"):
def KeepAlive(self):
while True:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto("_GPHD_:0:0:2:0.000000", ("10.5.5.9", 8554))
sleep(2500/1000)
sock.sendto("_GPHD_:0:0:2:0.000000\n".encode(), ("10.5.5.9", 8554))
time.sleep(2500/1000)
def getPassword(self):
try:
PASSWORD = urllib.request.urlopen('http://10.5.5.9/bacpac/sd', timeout=5).read()
Expand Down
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
print(gpCam.getMedia())
print(gpCam.getMediaInfo("file"))
gpCam.syncTime()
gpCam.KeepAlive()

0 comments on commit 867b2a4

Please sign in to comment.