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