mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 08:15:19 +03:00
Read and write nrf24rx_channel_count setting
Wasn't read not written by the configurator, so the new receiver_type byte was interpreted as the SPI channel count.
This commit is contained in:
parent
587d1c5cb4
commit
52c17cf8b7
1 changed files with 9 additions and 0 deletions
|
@ -593,8 +593,12 @@ var mspHelper = (function (gui) {
|
||||||
offset++;
|
offset++;
|
||||||
RX_CONFIG.nrf24rx_id = data.getUint32(offset, true);
|
RX_CONFIG.nrf24rx_id = data.getUint32(offset, true);
|
||||||
offset += 4;
|
offset += 4;
|
||||||
|
RX_CONFIG.nrf24rx_channel_count = data.getUint8(offset);
|
||||||
|
offset += 1;
|
||||||
}
|
}
|
||||||
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
||||||
|
// unused byte for fpvCamAngleDegrees, for compatiblity with betaflight
|
||||||
|
offset += 1;
|
||||||
RX_CONFIG.receiver_type = data.getUint8(offset);
|
RX_CONFIG.receiver_type = data.getUint8(offset);
|
||||||
offset += 1;
|
offset += 1;
|
||||||
}
|
}
|
||||||
|
@ -1169,12 +1173,17 @@ var mspHelper = (function (gui) {
|
||||||
buffer.push(0);
|
buffer.push(0);
|
||||||
buffer.push(0);
|
buffer.push(0);
|
||||||
buffer.push(RX_CONFIG.nrf24rx_protocol);
|
buffer.push(RX_CONFIG.nrf24rx_protocol);
|
||||||
|
// nrf24rx_id - 4 bytes
|
||||||
buffer.push(RX_CONFIG.nrf24rx_id & 0xFF);
|
buffer.push(RX_CONFIG.nrf24rx_id & 0xFF);
|
||||||
buffer.push((RX_CONFIG.nrf24rx_id >> 8) & 0xFF);
|
buffer.push((RX_CONFIG.nrf24rx_id >> 8) & 0xFF);
|
||||||
buffer.push((RX_CONFIG.nrf24rx_id >> 16) & 0xFF);
|
buffer.push((RX_CONFIG.nrf24rx_id >> 16) & 0xFF);
|
||||||
buffer.push((RX_CONFIG.nrf24rx_id >> 24) & 0xFF);
|
buffer.push((RX_CONFIG.nrf24rx_id >> 24) & 0xFF);
|
||||||
|
|
||||||
|
buffer.push(RX_CONFIG.nrf24rx_channel_count);
|
||||||
}
|
}
|
||||||
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
||||||
|
// unused byte for fpvCamAngleDegrees, for compatiblity with betaflight
|
||||||
|
buffer.push(0);
|
||||||
// receiver type in RX_CONFIG rather than in BF_CONFIG.features
|
// receiver type in RX_CONFIG rather than in BF_CONFIG.features
|
||||||
buffer.push(RX_CONFIG.receiver_type);
|
buffer.push(RX_CONFIG.receiver_type);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue