fix dronecan zero data type handling

This commit is contained in:
2026-05-23 08:56:26 +08:00
parent 1cd3badb2d
commit fe841fb0ba

View File

@@ -187,7 +187,7 @@ class Node extends EventEmitter {
this.emit(topicName, transfer);
}
} else {
if (!transfer.dataTypeId || !transfer.payload) {
if (transfer.dataTypeId === null || transfer.dataTypeId === undefined || !transfer.payload) {
// console.error('#TODO dataTypeId or payload is null');
return;
}
@@ -425,7 +425,7 @@ class Node extends EventEmitter {
}
fetchNodeParam(sourceNodeId, index, name, callback=null) {
// console.log('Fetching node param:', sourceNodeId, index, name);
console.log('Fetching node param:', sourceNodeId, index, name);
// const currentRequestIndex = index;
this.nodeParamsRequestingNodeId = sourceNodeId;
this.setNodeParamsRequestingIndex(sourceNodeId, index);