IIC added (#870)

* IIC added

* Fixed bug with not detecting device
This commit is contained in:
Max authored and Peli de Halleux committed 2019-08-27 17:57:21 -07:00
1 parent fb255edafe
commit db9b6a995b
2 files changed
+186 -8

No files matched your search

+1
View File
@@ -27,6 +27,7 @@ namespace pxsim.sensors {
export function __sensorUsed(port: number, type: number) {
//console.log("SENSOR INIT " + port + ", type: " + type);
if (type == DAL.DEVICE_TYPE_IIC_UNKNOWN) return; // Ignore IIC
if (!ev3board().hasSensor(port)) {
const sensor = ev3board().getSensor(port, type);
runtime.queueDisplayUpdate();