minor PR feedback

This commit is contained in:
Sam El-Husseini 2017-12-19 14:57:28 -08:00
parent ef5fa9ae82
commit 1ab7ae6cfa

View File

@ -14,7 +14,9 @@ namespace pxsim.output {
export function setLights(pattern: number) {
const brickState = ev3board().getBrickNode();
const lightState = brickState.lightState;
lightState.lightPattern = pattern;
brickState.setChangedState();
if (lightState.lightPattern != pattern) {
lightState.lightPattern = pattern;
brickState.setChangedState();
}
}
}