Skip to content

Tell pixhawk to output a PWM signal #10

@mariusbrataas

Description

@mariusbrataas

Hey!

I've been trying to communicate with a pixhawk using this library, but haven't had any luck so far.
My test script looks like this:

var SerialPort = require('serialport');
var mavlink = require('mavlink');

var myMAV = new mavlink(1,1,"v1.0",["common", "pixhawk"]);
var serialport = new SerialPort('/dev/ttyACM0', {baudRate: 57600});

myMAV.createMessage(
	'MAV_CMD_DO_SET_SERVO',
	{
		'1': 2000,
		'2': 2000,
		'3': 2000,
		'4': 2000,
		'5': 2000,
		'6': 2000,
		'7': 2000
	},
	(message) => {
		serialport.write(message.buffer);
	}
);

I guessed at MAV_CMD_DO_SET_SERVO because of it's definition in the common definitions xml file, but the output from running this command is simply saying Message 'MAV_CMD_DO_SET_SERVO' does not exist!, similar to this issue.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions