From 71345419d53d147a1ace8e782d9ea0e5561fe799 Mon Sep 17 00:00:00 2001 From: wuxu Date: Sat, 23 May 2026 08:56:59 +0800 Subject: [PATCH] route can frames through session --- src/App.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/App.js b/src/App.js index d6d7511..0d73add 100644 --- a/src/App.js +++ b/src/App.js @@ -23,15 +23,7 @@ import DNAServerModal from './DNAServerModal'; window.mavlinkSession = new MavlinkSession(); window.localNode = new dronecan.Node({name: "com.vimdrones.web_gui"}); localNode.on('sendFrame', (messageId, data, len) => { - const msg = new mavlink20.messages.can_frame( - mavlinkSession.targetSystem, // target_system - mavlinkSession.targetComponent, // target_component - localNode.bus, - len, - messageId, - data.toString('binary') - ); - mavlinkSession.sendMavlinkMsg(msg); + mavlinkSession.sendCanFrame(localNode.bus, messageId, data, len); });