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:
parent
fb46711659
commit
ef0c637877
8 changed files with 455 additions and 4 deletions
16
js/msp.js
16
js/msp.js
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue