mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 13:25:22 +03:00
Rename all references to NRF24 as protocol to SPI
For consistency. We now have other receivers that work over SPI and might have more in the future.
This commit is contained in:
parent
52c17cf8b7
commit
42f332e627
5 changed files with 24 additions and 27 deletions
|
@ -589,11 +589,11 @@ var mspHelper = (function (gui) {
|
|||
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);
|
||||
RX_CONFIG.spirx_protocol = data.getUint8(offset);
|
||||
offset++;
|
||||
RX_CONFIG.nrf24rx_id = data.getUint32(offset, true);
|
||||
RX_CONFIG.spirx_id = data.getUint32(offset, true);
|
||||
offset += 4;
|
||||
RX_CONFIG.nrf24rx_channel_count = data.getUint8(offset);
|
||||
RX_CONFIG.spirx_channel_count = data.getUint8(offset);
|
||||
offset += 1;
|
||||
}
|
||||
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
||||
|
@ -1172,14 +1172,10 @@ var mspHelper = (function (gui) {
|
|||
buffer.push(0);
|
||||
buffer.push(0);
|
||||
buffer.push(0);
|
||||
buffer.push(RX_CONFIG.nrf24rx_protocol);
|
||||
// nrf24rx_id - 4 bytes
|
||||
buffer.push(RX_CONFIG.nrf24rx_id & 0xFF);
|
||||
buffer.push((RX_CONFIG.nrf24rx_id >> 8) & 0xFF);
|
||||
buffer.push((RX_CONFIG.nrf24rx_id >> 16) & 0xFF);
|
||||
buffer.push((RX_CONFIG.nrf24rx_id >> 24) & 0xFF);
|
||||
|
||||
buffer.push(RX_CONFIG.nrf24rx_channel_count);
|
||||
buffer.push(RX_CONFIG.spirx_protocol);
|
||||
// spirx_id - 4 bytes
|
||||
buffer.push32(RX_CONFIG.spirx_id);
|
||||
buffer.push(RX_CONFIG.spirx_channel_count);
|
||||
}
|
||||
if (semver.gt(CONFIG.flightControllerVersion, "1.7.3")) {
|
||||
// unused byte for fpvCamAngleDegrees, for compatiblity with betaflight
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue