Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveyBiggers committed Sep 26, 2017
2 parents 626882b + 5738fa3 commit 52b54f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Malmo/samples/Python_examples/radar_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def processFrame(self, frame):

# Get the depth value from the centre of the map:
mid_pix = 2 * video_width * (video_height + 1) # flattened index of middle pixel
depth = scale * struct.unpack('f', str(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float
depth = scale * struct.unpack('f', bytes(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float

# Draw the "blip":
x = cx + depth * math.cos(angle)
Expand Down

0 comments on commit 52b54f5

Please sign in to comment.