X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fkaka%2Fcakelight%2Fmode%2FSunriseMode.java;h=260d53f0ee47b9a7113d1d995629b18f98b8f71a;hb=054af8b2a7970136ad665dc999cf83c077e17b1a;hp=896646f39d56153adf9222193afd0394729bcd4c;hpb=40a06a9bffb56d41e931038fcfdb8f10fe8ca441;p=kaka%2Fcakelight.git diff --git a/src/kaka/cakelight/mode/SunriseMode.java b/src/kaka/cakelight/mode/SunriseMode.java index 896646f..260d53f 100644 --- a/src/kaka/cakelight/mode/SunriseMode.java +++ b/src/kaka/cakelight/mode/SunriseMode.java @@ -12,6 +12,10 @@ public class SunriseMode extends AmbientMode { @Override protected void updateFrame(LedFrame frame, long time, int count) { + if (time > durationSeconds * 1000) { + frame.fillColor(Color.rgb(255, 255, 255)); + return; + } double progress = clamp(time / (durationSeconds * 1000.0)); double elevation = 2.0 - progress; double radius = progress * 2.12;