@ray-js/lamp-schedule-core 1.0.5-beta.4 → 1.0.5-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -78,7 +78,9 @@ export class SleepSigmesh {
|
|
|
78
78
|
const dataModeNum = typeof data.dataMode === 'string' ? parseInt(data.dataMode, 10) : data.dataMode;
|
|
79
79
|
// 使用 nodes.length 而非 data.length,因为调用方可能未更新 length 字段
|
|
80
80
|
const nodeCount = (_data$nodes$length = (_data$nodes = data.nodes) === null || _data$nodes === void 0 ? void 0 : _data$nodes.length) !== null && _data$nodes$length !== void 0 ? _data$nodes$length : data.length;
|
|
81
|
-
|
|
81
|
+
// 版本号固定为 1, 与文档不一致,文档有问题
|
|
82
|
+
|
|
83
|
+
const result = [numToHexString(1), numToHexString(dataModeNum), numToHexString(nodeCount)];
|
|
82
84
|
data.nodes.forEach(node => {
|
|
83
85
|
var _node$loops;
|
|
84
86
|
result.push(numToHexString(node.onOff ? 1 : 0), numToHexString(parseInt(node === null || node === void 0 || (_node$loops = node.loops) === null || _node$loops === void 0 || (_node$loops = _node$loops.split('')) === null || _node$loops === void 0 || (_node$loops = _node$loops.reverse()) === null || _node$loops === void 0 ? void 0 : _node$loops.join(''), 2)), numToHexString(node.step), numToHexString(node.hour), numToHexString(node.minute), numToHexString(node.brightness), numToHexString(node.temperature));
|
|
@@ -72,7 +72,9 @@ export class WakeUpSigmesh {
|
|
|
72
72
|
const dataModeNum = typeof data.dataMode === 'string' ? parseInt(data.dataMode, 10) : data.dataMode;
|
|
73
73
|
// 使用 nodes.length 而非 data.length,因为调用方可能未更新 length 字段
|
|
74
74
|
const nodeCount = (_data$nodes = data.nodes) === null || _data$nodes === void 0 ? void 0 : _data$nodes.length;
|
|
75
|
-
|
|
75
|
+
// 版本号固定为 1, 与文档不一致,文档有问题
|
|
76
|
+
|
|
77
|
+
const result = [numToHexString(1), numToHexString(dataModeNum), numToHexString(nodeCount)];
|
|
76
78
|
data.nodes.forEach(node => {
|
|
77
79
|
var _node$loops;
|
|
78
80
|
result.push(numToHexString(node.onOff ? 1 : 0), numToHexString(parseInt(node === null || node === void 0 || (_node$loops = node.loops) === null || _node$loops === void 0 || (_node$loops = _node$loops.split('')) === null || _node$loops === void 0 || (_node$loops = _node$loops.reverse()) === null || _node$loops === void 0 ? void 0 : _node$loops.join(''), 2)), numToHexString(node.step), numToHexString(node.hour), numToHexString(node.minute), numToHexString(node.brightness), numToHexString(node.temperature), numToHexString(node.duration));
|