Merge pull request #97 from Microsoft/startup_delay

Startup delay for sensors to get values
This commit is contained in:
Peli de Halleux
2017-12-15 07:05:21 -08:00
committed by GitHub
4 changed files with 12 additions and 2 deletions

View File

@ -393,6 +393,10 @@ static void runPoller(Thread *thr) {
// note that this is run without the user mutex held - it should not modify any state!
TValue prev = pxt::runAction0(query);
startUser();
pxt::runAction2(thr->act, prev, prev);
stopUser();
while (true) {
sleep_core_us(us);
if (paniced)