1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-22 15:55:33 +03:00

Merge pull request #1930 from mikeller/added_redpine_spi_protocol

Added the REDPINE SPI RX protocol. Also added SPI RX to analytics.
This commit is contained in:
Michael Keller 2020-03-24 01:06:01 +13:00 committed by GitHub
commit 6251034489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -861,13 +861,27 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
);
}
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
spiRxTypes.push(
'REDPINE',
);
}
var spiRx_e = $('select.spiRx');
for (var i = 0; i < spiRxTypes.length; i++) {
spiRx_e.append('<option value="' + i + '">' + spiRxTypes[i] + '</option>');
}
spiRx_e.change(function () {
RX_CONFIG.rxSpiProtocol = parseInt($(this).val());
const value = parseInt($(this).val());
let newValue = undefined;
if (value !== RX_CONFIG.rxSpiProtocol) {
newValue = $(this).find('option:selected').text();
}
self.analyticsChanges['SPIRXProtocol'] = newValue;
RX_CONFIG.rxSpiProtocol = value;
});
// select current serial RX type