diff --git a/js/backup_restore.js b/js/backup_restore.js index 7b37046e..4385d0f9 100644 --- a/js/backup_restore.js +++ b/js/backup_restore.js @@ -112,7 +112,7 @@ function configuration_backup(callback) { uniqueData.push(MSP_codes.MSP_FAILSAFE_CONFIG); uniqueData.push(MSP_codes.MSP_RXFAIL_CONFIG); } - if (semver.gte(CONFIG.apiVersion, "1.17.0")) { + if (semver.gte(CONFIG.apiVersion, "1.19.0")) { uniqueData.push(MSP_codes.MSP_LED_STRIP_MODECOLOR); } } @@ -136,7 +136,7 @@ function configuration_backup(callback) { configuration.LED_STRIP = jQuery.extend(true, [], LED_STRIP); configuration.LED_COLORS = jQuery.extend(true, [], LED_COLORS); - if (semver.gte(CONFIG.apiVersion, "1.17.0")) { + if (semver.gte(CONFIG.apiVersion, "1.19.0")) { configuration.LED_MODE_COLORS = jQuery.extend(true, [], LED_MODE_COLORS); } if (semver.gte(CONFIG.apiVersion, "1.8.0")) { @@ -612,7 +612,7 @@ function configuration_restore(callback) { appliedMigrationsCount++; } - if (!compareVersions(migratedVersion, '1.2.1')) { + if (!compareVersions(migratedVersion, '1.3.1')) { // LED_COLORS & LED_MODE_COLORS support was added. if (!configuration.LED_COLORS) { @@ -622,7 +622,7 @@ function configuration_restore(callback) { configuration.LED_MODE_COLORS = []; } - migratedVersion = '1.2.1'; + migratedVersion = '1.3.1'; GUI.log(chrome.i18n.getMessage('configMigratedTo', [migratedVersion])); appliedMigrationsCount++; } @@ -793,7 +793,7 @@ function configuration_restore(callback) { } function send_led_strip_mode_colors() { - if (semver.gte(CONFIG.apiVersion, "1.17.0")) + if (semver.gte(CONFIG.apiVersion, "1.19.0")) MSP.sendLedStripModeColors(send_rxfail_config); else send_rxfail_config(); diff --git a/js/msp.js b/js/msp.js index 31b32c1a..198b504f 100755 --- a/js/msp.js +++ b/js/msp.js @@ -941,13 +941,13 @@ var MSP = { LED_STRIP = []; var ledCount = data.byteLength / 7; // v1.4.0 and below incorrectly reported 4 bytes per led. - if (semver.gte(CONFIG.apiVersion, "1.17.0")) + if (semver.gte(CONFIG.apiVersion, "1.20.0")) ledCount = data.byteLength / 4; var offset = 0; for (var i = 0; offset < data.byteLength && i < ledCount; i++) { - if (semver.lt(CONFIG.apiVersion, "1.17.0")) { + if (semver.lt(CONFIG.apiVersion, "1.20.0")) { var directionMask = data.getUint16(offset, 1); offset += 2; @@ -1048,7 +1048,7 @@ var MSP = { console.log('Led strip colors saved'); break; case MSP_codes.MSP_LED_STRIP_MODECOLOR: - if (semver.gte(CONFIG.apiVersion, "1.17.0")) { + if (semver.gte(CONFIG.apiVersion, "1.19.0")) { LED_MODE_COLORS = []; @@ -1838,7 +1838,7 @@ MSP.sendLedStripConfig = function(onCompleteCallback) { buffer.push(ledIndex); - if (semver.lt(CONFIG.apiVersion, "1.17.0")) { + if (semver.lt(CONFIG.apiVersion, "1.20.0")) { var directionMask = 0; for (var directionLetterIndex = 0; directionLetterIndex < led.directions.length; directionLetterIndex++) { var bitIndex = MSP.ledDirectionLetters.indexOf(led.directions[directionLetterIndex]); diff --git a/tabs/led_strip.html b/tabs/led_strip.html index 27ade963..bd9d6e20 100644 --- a/tabs/led_strip.html +++ b/tabs/led_strip.html @@ -64,9 +64,9 @@ - - - + + + @@ -78,13 +78,13 @@ -