Skip to content

Instantly share code, notes, and snippets.

@bitmorse
Created May 30, 2019 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitmorse/5012dac61ab4907a7705b2ede5eacdb0 to your computer and use it in GitHub Desktop.
Save bitmorse/5012dac61ab4907a7705b2ede5eacdb0 to your computer and use it in GitHub Desktop.
const { adapters } = require('slcan');
const { dataTypes } = require('uavcan');
let body = {
dataTypeID: 'uavcan.protocol.param.GetSet',
value: {
index: 0,
value: {
integerValue: 123
},
nameStr: ""
},
destinationNodeID: 111
};
setInterval(()=>{
adapters['/dev/tty.usbmodem204F3261564D1'].adapterNode.sendRequest(
body.value,
body.dataTypeID,
body.destinationNodeID
);
},2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment