diff --git a/sim/state/light.ts b/sim/state/light.ts index cbf98c2b..a2616fd3 100644 --- a/sim/state/light.ts +++ b/sim/state/light.ts @@ -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(); + } } } \ No newline at end of file