feat: split VFD backends by hardware

This commit is contained in:
OpenClaw Bot
2026-04-26 23:12:12 +08:00
parent c9ce87c93a
commit 03dc7c2527
5 changed files with 759 additions and 356 deletions

22
lib/led/detect.js Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
const fs = require('fs');
function readDeviceModel() {
try {
return fs.readFileSync('/proc/device-tree/model', 'utf8')
.replace(/\0/g, '')
.trim();
} catch (_) {
return '';
}
}
function isRK3566() {
return /RK3566/i.test(readDeviceModel());
}
module.exports = {
readDeviceModel,
isRK3566,
};