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.mavlinkSession = new MavlinkSession();
|
||||||
window.localNode = new dronecan.Node({name: "com.vimdrones.web_gui"});
|
window.localNode = new dronecan.Node({name: "com.vimdrones.web_gui"});
|
||||||
localNode.on('sendFrame', (messageId, data, len) => {
|
localNode.on('sendFrame', (messageId, data, len) => {
|
||||||
const msg = new mavlink20.messages.can_frame(
|
mavlinkSession.sendCanFrame(localNode.bus, messageId, data, len);
|
||||||
mavlinkSession.targetSystem, // target_system
|
|
||||||
mavlinkSession.targetComponent, // target_component
|
|
||||||
localNode.bus,
|
|
||||||
len,
|
|
||||||
messageId,
|
|
||||||
data.toString('binary')
|
|
||||||
);
|
|
||||||
mavlinkSession.sendMavlinkMsg(msg);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user