X-Git-Url: http://dolda2000.com/gitweb/?p=kaka%2Fcakelight.git;a=blobdiff_plain;f=src%2Fkaka%2Fcakelight%2FCakeLight.java;h=95a3be11f639b20786597345012901655d5f8b0f;hp=69f6677af0d8a80ae5be7bb45514abb8de55c8dc;hb=6e568391dad1a1c47b5697a2f1ef90a685859a84;hpb=dc8770201bf2e103dbb2834694fafd32c9ddc325 diff --git a/src/kaka/cakelight/CakeLight.java b/src/kaka/cakelight/CakeLight.java index 69f6677..95a3be1 100644 --- a/src/kaka/cakelight/CakeLight.java +++ b/src/kaka/cakelight/CakeLight.java @@ -20,6 +20,7 @@ public class CakeLight { public void cleanup() { if (this.mode != null) { + this.mode.setFrameListener(ledFrame -> {}); // To avoid any frame being sent to the controller while the thread is exiting this.mode.exit(); } } @@ -42,6 +43,6 @@ public class CakeLight { public void turnOff() { cleanup(); - ledController.onFrame(LedFrame.from(config)); + ledController.onFrame(LedFrame.from(config).fillColor(0, 0, 0)); } }