1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 16:25:19 +03:00

Add control sticks for MSP Rx, suitable for debugging CF without a Tx

This commit is contained in:
Nicholas Sherlock 2015-07-23 12:54:34 +12:00
parent fb46711659
commit ef0c637877
8 changed files with 455 additions and 4 deletions

View file

@ -1130,6 +1130,22 @@ MSP.crunch = function (code) {
return buffer;
};
/**
* Set raw Rx values over MSP protocol.
*
* Channels is an array of 16-bit unsigned integer channel values to be sent. 8 channels is probably the maximum.
*/
MSP.setRawRx = function(channels) {
var buffer = [];
for (var i = 0; i < channels.length; i++) {
buffer.push(specificByte(channels[i], 0));
buffer.push(specificByte(channels[i], 1));
}
MSP.send_message(MSP_codes.MSP_SET_RAW_RC, buffer, false);
}
/**
* Send a request to read a block of data from the dataflash at the given address and pass that address and a dataview
* of the returned data to the given callback (or null for the data if an error occured).