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); });