1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 12:25:13 +03:00

Fixed to be up to date with latest changes in iNav

This commit is contained in:
Martin Budden 2016-08-09 20:17:26 +01:00
parent 8cde4a3de4
commit d830b3d05b
2 changed files with 7 additions and 2 deletions

View file

@ -854,6 +854,7 @@ var MSP = {
RX_CONFIG.rx_max_usec = data.getUint16(offset, 1);
offset += 2;
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
offset += 4; // 4 null bytes for betaflight compatibility
RX_CONFIG.nrf24rx_protocol = data.getUint8(offset, 1);
offset++;
RX_CONFIG.nrf24rx_id = data.getUint32(offset, 1);
@ -1387,6 +1388,10 @@ MSP.crunch = function (code) {
buffer.push(lowByte(RX_CONFIG.rx_max_usec));
buffer.push(highByte(RX_CONFIG.rx_max_usec));
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
buffer.push(0); // 4 null bytes for betaflight compatibility
buffer.push(0);
buffer.push(0);
buffer.push(0);
buffer.push(RX_CONFIG.nrf24rx_protocol);
buffer.push(RX_CONFIG.nrf24rx_id & 0xFF);
buffer.push((RX_CONFIG.nrf24rx_id >> 8) & 0xFF);

View file

@ -156,8 +156,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
if (semver.gte(CONFIG.apiVersion, "1.21.0")) {
features.push(
{bit: 26, group: 'rxMode', mode: 'group', name: 'RX_NRF24', haveTip: true},
{bit: 27, group: 'other', name: 'SOFTSPI'}
{bit: 25, group: 'rxMode', mode: 'group', name: 'RX_NRF24', haveTip: true},
{bit: 26, group: 'other', name: 'SOFTSPI'}
);
}