Output set Type fix (#487)

* properly send outputsettype info

* fix simulator

* bump pxt

* typo in docs
This commit is contained in:
Peli de Halleux
2018-04-11 08:48:07 -06:00
committed by GitHub
parent 80989cf4c9
commit 4627328bcd
4 changed files with 26 additions and 17 deletions

View File

@ -122,10 +122,11 @@ namespace pxsim {
return 2;
}
case DAL.opOutputSetType: {
const port = buf.data[1];
const portIndex = buf.data[1]; // not a port but a port index 0..3
const large = buf.data[2] == 0x07;
const motors = ev3board().getMotor(port);
motors.forEach(motor => motor.setLarge(large));
const motor = ev3board().getMotors()[portIndex];
if (motor)
motor.setLarge(large);
return 2;
}
default: