Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function terminate() {
turnOff();
pigpio.terminate(); // pigpio C library terminated here
beoBus.emit("general", {header: "shutdownComplete", content: {extension: "led"}});
}
process.on('SIGINT', function () {
pigpio.terminate();
process.nextTick(function () { process.exit(0); });
});
process.on('SIGINT', function () {
pigpio.terminate();
ws281x.reset();
process.nextTick(function () { process.exit(0); });
});