HOTFIX
Took 11 minutes
This commit is contained in:
parent
b7a500f149
commit
b8f09542b6
@ -46,7 +46,7 @@ export class LEDHandler {
|
||||
}
|
||||
|
||||
static init(): Promise<void> {
|
||||
return new Promise<void>(async () => {
|
||||
return new Promise<void>(async (resolve) => {
|
||||
const options = {
|
||||
dma: 10,
|
||||
freq: 800000,
|
||||
@ -59,15 +59,17 @@ export class LEDHandler {
|
||||
this.channel = ws281x(20, options);
|
||||
|
||||
setInterval(this.loop, 1000);
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
private static loop(): Promise<void> {
|
||||
return new Promise<void>(() => {
|
||||
return new Promise<void>((resolve) => {
|
||||
if (this.currentInterval)
|
||||
return;
|
||||
|
||||
LEDHandler.ambientColor();
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user