fix port bug

This commit is contained in:
Peli de Halleux 2018-02-02 14:19:07 -08:00
parent 6879961297
commit 22c31c57df

View File

@ -231,7 +231,7 @@ namespace pxsim.visuals {
break; break;
} }
case NodeType.InfraredSensor: { case NodeType.InfraredSensor: {
const state = ev3board().getInputNodes()[0] as InfraredSensorNode; const state = ev3board().getInputNodes()[port] as InfraredSensorNode;
if (state.getMode() == InfraredSensorMode.Proximity) if (state.getMode() == InfraredSensorMode.Proximity)
view = new ProximitySliderControl(this.element, this.defs, state, port); view = new ProximitySliderControl(this.element, this.defs, state, port);
else if (state.getMode() == InfraredSensorMode.RemoteControl) else if (state.getMode() == InfraredSensorMode.RemoteControl)