Merge pull request #684 from mikeller/fix_dataflash_unavailable_during_erase

Fix dataflash unavailable during erase
10.3.x-maintenance
Michael Keller 2017-10-12 12:27:54 +13:00 committed by GitHub
commit ef9823f56f
2 changed files with 2 additions and 2 deletions

View File

@ -1000,7 +1000,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
if (data.byteLength >= 13) { if (data.byteLength >= 13) {
var flags = data.readU8(); var flags = data.readU8();
DATAFLASH.ready = (flags & 1) != 0; DATAFLASH.ready = (flags & 1) != 0;
DATAFLASH.supported = (flags & 2) != 0 || DATAFLASH.ready; DATAFLASH.supported = (flags & 2) != 0;
DATAFLASH.sectors = data.readU32(); DATAFLASH.sectors = data.readU32();
DATAFLASH.totalSize = data.readU32(); DATAFLASH.totalSize = data.readU32();
DATAFLASH.usedSize = data.readU32(); DATAFLASH.usedSize = data.readU32();

View File

@ -156,7 +156,7 @@ TABS.onboard_logging.initialize = function (callback) {
if (semver.gte(CONFIG.apiVersion, "1.33.0")) { if (semver.gte(CONFIG.apiVersion, "1.33.0")) {
deviceSelect.append('<option value="0">' + chrome.i18n.getMessage('blackboxLoggingNone') + '</option>'); deviceSelect.append('<option value="0">' + chrome.i18n.getMessage('blackboxLoggingNone') + '</option>');
if (DATAFLASH.ready) { if (DATAFLASH.supported) {
deviceSelect.append('<option value="1">' + chrome.i18n.getMessage('blackboxLoggingFlash') + '</option>'); deviceSelect.append('<option value="1">' + chrome.i18n.getMessage('blackboxLoggingFlash') + '</option>');
} }
if (SDCARD.supported) { if (SDCARD.supported) {