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();
}
}
public void turnOff() {
cleanup();
- ledController.onFrame(LedFrame.from(config));
+ ledController.onFrame(LedFrame.from(config).fillColor(0, 0, 0));
}
}