pxt-ev3/sim/state/input.ts

18 lines
484 B
TypeScript
Raw Normal View History

2017-12-18 22:04:17 +01:00
namespace pxsim.motors {
export function __motorUsed(port: number, large: boolean) {
//console.log("MOTOR INIT " + port);
ev3board().motorUsed(port, large);
2017-12-18 22:04:17 +01:00
runtime.queueDisplayUpdate();
}
}
namespace pxsim.sensors {
export function __sensorUsed(port: number, type: number) {
//console.log("SENSOR INIT " + port + ", type: " + type);
2017-12-18 22:04:17 +01:00
const sensor = ev3board().getSensor(port, type);
runtime.queueDisplayUpdate();
}
}