lancaster-university / microbit-dal

http://lancaster-university.github.io/microbit-docs
Other
254 stars 130 forks source link

Register MicroBitAccelerometer::lastGesture on shake #381

Closed microbit-carlos closed 6 years ago

microbit-carlos commented 6 years ago

Info: https://github.com/lancaster-university/microbit-dal/issues/372#issuecomment-417731360

dpgeorge commented 6 years ago

This looks good to me (except I'd set the variable before triggering the event). I tested the change and it does fix the following test code:

from microbit import *
while True:
    print(accelerometer.current_gesture())
    sleep(200)
finneyj commented 6 years ago

Thanks @microbit-carlos @dpgeorge

Looks good to me - perfect fix @microbit-carlos.

I've merged this into the dal-integration branch ready for the next release.