CF/BF - fix blackbox logging to use the right device numbers.
parent
5f0149d161
commit
19f320e2f6
|
@ -86,7 +86,7 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
*
|
||||
* The best we can do on those targets is check the BLACKBOX feature bit to identify support for Blackbox instead.
|
||||
*/
|
||||
if ((BLACKBOX.supported || DATAFLASH.supported) && FEATURE_CONFIG.features.isEnabled('BLACKBOX')) {
|
||||
if ((BLACKBOX.supported || DATAFLASH.supported) && (semver.gte(CONFIG.apiVersion, "1.33.0") || FEATURE_CONFIG.features.isEnabled('BLACKBOX'))) {
|
||||
blackboxSupport = 'yes';
|
||||
} else {
|
||||
blackboxSupport = 'no';
|
||||
|
@ -150,6 +150,7 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
function populateDevices(deviceSelect) {
|
||||
deviceSelect.empty();
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
|
||||
deviceSelect.append('<option value="0">' + chrome.i18n.getMessage('blackboxLoggingNone') + '</option>');
|
||||
if (DATAFLASH.ready) {
|
||||
deviceSelect.append('<option value="1">' + chrome.i18n.getMessage('blackboxLoggingFlash') + '</option>');
|
||||
|
@ -158,6 +159,15 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
deviceSelect.append('<option value="2">' + chrome.i18n.getMessage('blackboxLoggingSdCard') + '</option>');
|
||||
}
|
||||
deviceSelect.append('<option value="3">' + chrome.i18n.getMessage('blackboxLoggingSerial') + '</option>');
|
||||
} else {
|
||||
deviceSelect.append('<option value="0">' + chrome.i18n.getMessage('blackboxLoggingSerial') + '</option>');
|
||||
if (DATAFLASH.ready) {
|
||||
deviceSelect.append('<option value="1">' + chrome.i18n.getMessage('blackboxLoggingFlash') + '</option>');
|
||||
}
|
||||
if (SDCARD.supported) {
|
||||
deviceSelect.append('<option value="2">' + chrome.i18n.getMessage('blackboxLoggingSdCard') + '</option>');
|
||||
}
|
||||
}
|
||||
|
||||
deviceSelect.val(BLACKBOX.blackboxDevice);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue