dya2 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

startSensing() fills event buffer with identical information #409

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Remove droid.stopSensing()from script below and it works
2. Put droid.stopSensing() back and it doesn't

What is the expected output? What do you see instead?
During the video recording the event buffer should show a range of sensor 
readings. With droid.stopSensing() in the script the readings are all identical.

What version of the product are you using? On what operating system?
HTC Desire. SL4Ar1 python

Please provide any additional information below.
# Script to read sensors while recording video:

import android

droid = android.Android()

# buffer sensor data
droid.startSensing()

# take 5 second video
droid.recorderCaptureVideo('sdcard/vid1.mp4', 5, True)

# stop recording sensors
droid.stopSensing() # remove this and it works!

# check the buffer
for i in range(1, 250):
  print droid.receiveEvent()

#200 readings all the same!

Original issue reported on code.google.com by joka...@gmail.com on 29 Aug 2010 at 11:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 238c92c55c.

Original comment by Alexey.R...@gmail.com on 30 Aug 2010 at 11:06