route can frames through session
This commit is contained in:
10
src/App.js
10
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);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user