Skip to content

Commit

Permalink
Merge pull request #16 from KCL-BMEIS/15_example_sctipt_fix
Browse files Browse the repository at this point in the history
#15 - example script closes when any key pressed
  • Loading branch information
crnbaker authored Nov 4, 2023
2 parents 91ea045 + d8d45d5 commit 4d1048c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Create a controller to start the device
controller = ProCaptureController(device)

print('PRESS Q TO QUIT!')
print('PRESS ANY KEY TO QUIT!')
counter = 0
timestamps = []
while True:
Expand All @@ -37,7 +37,7 @@
# Here we are using OpenCV to display the acquired frames after conversion to BGR numpy arrays
frame_array = frame.as_array(channel_order=RGBChannelOrder.BGR)
imshow("video", frame_array)
if waitKey(1) & 0xFF == ord('q'):
if waitKey(1) != -1:
break

# Every 60 frames, print some timing information
Expand Down

0 comments on commit 4d1048c

Please sign in to comment.