mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 19:56:37 +00:00
patch: Fix LEDs init error
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
This commit is contained in:
parent
b165fb78da
commit
4232928ad8
@ -245,16 +245,16 @@ export async function init(): Promise<void> {
|
|||||||
for (const [drivePath, ledsNames] of Object.entries(ledsMapping)) {
|
for (const [drivePath, ledsNames] of Object.entries(ledsMapping)) {
|
||||||
leds.set('/dev/disk/by-path/' + drivePath, new RGBLed(ledsNames));
|
leds.set('/dev/disk/by-path/' + drivePath, new RGBLed(ledsNames));
|
||||||
}
|
}
|
||||||
|
ledColors = (await settings.get('ledColors')) || {};
|
||||||
|
ledAnimationFunctions = {
|
||||||
|
blinkGreen: createAnimationFunction(blink, ledColors['green']),
|
||||||
|
blinkPurple: createAnimationFunction(blink, ledColors['purple']),
|
||||||
|
staticRed: createAnimationFunction(one, ledColors['red']),
|
||||||
|
staticGreen: createAnimationFunction(one, ledColors['green']),
|
||||||
|
staticBlue: createAnimationFunction(one, ledColors['blue']),
|
||||||
|
staticWhite: createAnimationFunction(one, ledColors['white']),
|
||||||
|
staticBlack: createAnimationFunction(one, ledColors['black']),
|
||||||
|
};
|
||||||
|
observe(_.debounce(stateObserver, 1000, { maxWait: 1000 }));
|
||||||
}
|
}
|
||||||
ledColors = (await settings.get('ledColors')) || {};
|
|
||||||
ledAnimationFunctions = {
|
|
||||||
blinkGreen: createAnimationFunction(blink, ledColors['green']),
|
|
||||||
blinkPurple: createAnimationFunction(blink, ledColors['purple']),
|
|
||||||
staticRed: createAnimationFunction(one, ledColors['red']),
|
|
||||||
staticGreen: createAnimationFunction(one, ledColors['green']),
|
|
||||||
staticBlue: createAnimationFunction(one, ledColors['blue']),
|
|
||||||
staticWhite: createAnimationFunction(one, ledColors['white']),
|
|
||||||
staticBlack: createAnimationFunction(one, ledColors['black']),
|
|
||||||
};
|
|
||||||
observe(_.debounce(stateObserver, 1000, { maxWait: 1000 }));
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user