Closed snehalpachigar closed 9 years ago
Hi,
At a quick glance of you code I can see a few improvements:-
I have cleaned up the if/then else condition a bit, but of course this has no bearing on the performance:- while ((System.currentTimeMillis() - startTime) < timeInMillis) { // Strobe for the amount of time specified. flag=!flag; lightState.setOn(flag); lightState.setTransitionTime(1); // max 65500 if (flag) lightState.setBrightness(254); // Only send brightness when turning light on.
bridge.updateLightState(light1, lightState, lightListener);
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
}
This works a bit better, but not completely smooth. I will get back to you as soon as I find a better way.
Hello, I am trying to get the strobe light effect with my hue bulbs, but for reason the result that I get are not satisfactory. I don't see a smooth strobe effect. Sometimes light gets stuck at a state and lags in giving the strobe effect. Every time the behavior is random. Is it difficult to have strobe effect? Here is the code that I use.
public void strobe(final int timeInMillis, final int speed) {
Am I doing something wrong? I do get the log that the state is validated, but light bridge doesnt update everytime as I want. Why am I not getting expected results?