1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-19 06:15:11 +03:00

Add support for the RX changes in MSP

Implement a combobox selector for the receiver type, showing
just the options for the specific type (e.g. selecting serial
receiver reveals the combobox for the serial protocol).

On INAV > 1.7.3 read and write receiver type to RX_CONFIG rather
than to feature bits. Note that this will break the configurator
in builds with version = 1.7.4 before https://github.com/iNavFlight/inav/pull/1596/files
is applied.
This commit is contained in:
Alberto García Hierro 2017-10-05 21:37:59 +01:00
parent 836f72661c
commit 587d1c5cb4
5 changed files with 126 additions and 25 deletions

View file

@ -594,6 +594,10 @@ var mspHelper = (function (gui) {
RX_CONFIG.nrf24rx_id = data.getUint32(offset, true);
offset += 4;
}
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
RX_CONFIG.receiver_type = data.getUint8(offset);
offset += 1;
}
break;
case MSPCodes.MSP_FAILSAFE_CONFIG:
@ -1170,6 +1174,10 @@ var mspHelper = (function (gui) {
buffer.push((RX_CONFIG.nrf24rx_id >> 16) & 0xFF);
buffer.push((RX_CONFIG.nrf24rx_id >> 24) & 0xFF);
}
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
// receiver type in RX_CONFIG rather than in BF_CONFIG.features
buffer.push(RX_CONFIG.receiver_type);
}
break;
case MSPCodes.MSP_SET_FAILSAFE_CONFIG: