Merge pull request #484 from Microsoft/bug_395_fix
Add eventTimestamp and eventValue to pxsim.control
This commit is contained in:
commit
9b7a81c41b
@ -38,6 +38,6 @@
|
|||||||
"semantic-ui-less": "^2.2.4"
|
"semantic-ui-less": "^2.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "0.12.103"
|
"pxt-core": "0.12.104"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,14 @@ namespace pxsim.control {
|
|||||||
// TODO mode?
|
// TODO mode?
|
||||||
board().bus.queue(id, evid)
|
board().bus.queue(id, evid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function eventTimestamp() {
|
||||||
|
return board().bus.getLastEventTime()
|
||||||
|
}
|
||||||
|
|
||||||
|
export function eventValue() {
|
||||||
|
return board().bus.getLastEventValue()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace pxsim.pxtcore {
|
namespace pxsim.pxtcore {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user