Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: microbit-dal-acc
Dependents: microbit-accelerometer-led
Fork of microbit by
Revision 5:8052323b72d2, committed 2016-04-08
- Comitter:
- LancasterUniversity
- Date:
- Fri Apr 08 16:36:37 2016 +0100
- Parent:
- 1:af427e419320
- Child:
- 6:9cbea9993ef1
- Commit message:
- Synchronized with git rev c5889e4c
Author: Joe Finney
microbit: BUGFIX Wake accelerometer on listen for GESTURE events
Previously, the accelerometer was only lazily initialised when it was
acccessed directly or an event handler was registered for
MICROBIT_ID_ACCELEROMETER. This patch also wakes the accelerometer on event
handlers registering for MICROBIT_ID_GESTURE.
Changed in this revision
| source/MicroBit.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/source/MicroBit.cpp Thu Apr 07 01:30:13 2016 +0100
+++ b/source/MicroBit.cpp Fri Apr 08 16:36:37 2016 +0100
@@ -208,6 +208,7 @@
break;
case MICROBIT_ID_ACCELEROMETER:
+ case MICROBIT_ID_GESTURE:
// A listener has been registered for the accelerometer.
// The accelerometer uses lazy instantiation, we just need to read the data once to start it running.
accelerometer.updateSample();
@@ -219,4 +220,4 @@
thermometer.updateSample();
break;
}
-}
+}
\ No newline at end of file
