Skip to content

Commit

Permalink
Workaround for new piloting and camera change states
Browse files Browse the repository at this point in the history
  • Loading branch information
m3d committed Feb 1, 2018
1 parent 6c59a2d commit ccc9d6f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion navdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,21 @@ def parseData( data, robot, verbose=False ):
robot.altitude = struct.unpack("d", data[11:11+8])[0]
if verbose:
print "Altitude", robot.altitude
elif commandClass == 4:
if verbose:
print "Piloting State change", commandId
elif (commandClass, commandId) == (25,0):
tilt,pan = struct.unpack("BB", data[11:11+2])
if verbose:
print "CameraState Tilt/Pan", tilt, pan
elif commandClass == 25:
if verbose:
print "CameraState changed", commandId
else:
if verbose:
print "UNKNOWN",
printHex( data[:frameSize] )
assert False
assert False, (commandClass, commandId)
else:
print "UNKNOWN Project", commandProject
elif frameId == 0x7E:
Expand Down

0 comments on commit ccc9d6f

Please sign in to comment.