Support for remote control buttons (#300)

* refactor beacon function inside IR sensor

* towards sim support

* channel labels

* reverting to singletons

* hiding unused apis

* lazy allocation of button instances

* tracking button state

* hook up the state
This commit is contained in:
Peli de Halleux
2018-02-02 09:48:27 -08:00
committed by GitHub
parent f36e14fe69
commit ba47fb0589
5 changed files with 198 additions and 100 deletions

View File

@ -13,6 +13,7 @@ namespace pxsim {
motorState: EV3MotorState;
screenState: EV3ScreenState;
audioState: AudioState;
remoteState: RemoteState;
inputNodes: SensorNode[] = [];
brickNode: BrickNode;
@ -38,6 +39,7 @@ namespace pxsim {
this.motorState = new EV3MotorState();
this.screenState = new EV3ScreenState();
this.audioState = new AudioState();
this.remoteState = new RemoteState();
}
receiveMessage(msg: SimulatorMessage) {