diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index c682e8d2..15d0ff90 100755
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -1458,7 +1458,7 @@
},
"ledStripHelp": {
- "message": "The flight controller can control colors and effects of individual LEDs on a strip. Configure LEDs on the grid, configure wiring order then attach LEDs on your aircraft according to grid positions. LEDs without wire ordering number will not be saved."
+ "message": "The flight controller can control colors and effects of individual LEDs on a strip.
Configure LEDs on the grid, configure wiring order then attach LEDs on your aircraft according to grid positions. LEDs without wire ordering number will not be saved.
Double-click on a color to edit the HSV values."
},
"ledStripButtonSave": {
"message": "Save"
diff --git a/js/backup_restore.js b/js/backup_restore.js
index 29367dca..7b37046e 100644
--- a/js/backup_restore.js
+++ b/js/backup_restore.js
@@ -94,7 +94,8 @@ function configuration_backup(callback) {
MSP_codes.MSP_RX_MAP,
MSP_codes.MSP_BF_CONFIG,
MSP_codes.MSP_CF_SERIAL_CONFIG,
- MSP_codes.MSP_LED_STRIP_CONFIG
+ MSP_codes.MSP_LED_STRIP_CONFIG,
+ MSP_codes.MSP_LED_COLORS
];
function update_unique_data_list() {
@@ -111,6 +112,9 @@ 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")) {
+ uniqueData.push(MSP_codes.MSP_LED_STRIP_MODECOLOR);
+ }
}
update_unique_data_list();
@@ -130,7 +134,11 @@ function configuration_backup(callback) {
configuration.BF_CONFIG = jQuery.extend(true, {}, BF_CONFIG);
configuration.SERIAL_CONFIG = jQuery.extend(true, {}, SERIAL_CONFIG);
configuration.LED_STRIP = jQuery.extend(true, [], LED_STRIP);
-
+ configuration.LED_COLORS = jQuery.extend(true, [], LED_COLORS);
+
+ if (semver.gte(CONFIG.apiVersion, "1.17.0")) {
+ configuration.LED_MODE_COLORS = jQuery.extend(true, [], LED_MODE_COLORS);
+ }
if (semver.gte(CONFIG.apiVersion, "1.8.0")) {
configuration.FC_CONFIG = jQuery.extend(true, {}, FC_CONFIG);
configuration.ARMING_CONFIG = jQuery.extend(true, {}, ARMING_CONFIG);
@@ -604,6 +612,21 @@ function configuration_restore(callback) {
appliedMigrationsCount++;
}
+ if (!compareVersions(migratedVersion, '1.2.1')) {
+
+ // LED_COLORS & LED_MODE_COLORS support was added.
+ if (!configuration.LED_COLORS) {
+ configuration.LED_COLORS = [];
+ }
+ if (!configuration.LED_MODE_COLORS) {
+ configuration.LED_MODE_COLORS = [];
+ }
+
+ migratedVersion = '1.2.1';
+ GUI.log(chrome.i18n.getMessage('configMigratedTo', [migratedVersion]));
+ appliedMigrationsCount++;
+ }
+
if (appliedMigrationsCount > 0) {
GUI.log(chrome.i18n.getMessage('configMigrationSuccessful', [appliedMigrationsCount]));
}
@@ -731,6 +754,8 @@ function configuration_restore(callback) {
BF_CONFIG = configuration.BF_CONFIG;
SERIAL_CONFIG = configuration.SERIAL_CONFIG;
LED_STRIP = configuration.LED_STRIP;
+ LED_COLORS = configuration.LED_COLORS;
+ LED_MODE_COLORS = configuration.LED_MODE_COLORS;
ARMING_CONFIG = configuration.ARMING_CONFIG;
FC_CONFIG = configuration.FC_CONFIG;
_3D = configuration._3D;
@@ -760,7 +785,18 @@ function configuration_restore(callback) {
}
function send_led_strip_config() {
- MSP.sendLedStripConfig(send_rxfail_config);
+ MSP.sendLedStripConfig(send_led_strip_colors);
+ }
+
+ function send_led_strip_colors() {
+ MSP.sendLedStripColors(send_led_strip_mode_colors);
+ }
+
+ function send_led_strip_mode_colors() {
+ if (semver.gte(CONFIG.apiVersion, "1.17.0"))
+ MSP.sendLedStripModeColors(send_rxfail_config);
+ else
+ send_rxfail_config();
}
function send_rxfail_config() {
diff --git a/js/fc.js b/js/fc.js
index c1abd715..6cd01080 100644
--- a/js/fc.js
+++ b/js/fc.js
@@ -4,6 +4,8 @@
var CONFIG;
var BF_CONFIG;
var LED_STRIP;
+var LED_COLORS;
+var LED_MODE_COLORS;
var PID;
var PID_names;
var PIDs;
@@ -73,6 +75,8 @@ var FC = {
};
LED_STRIP = [];
+ LED_COLORS = [];
+ LED_MODE_COLORS = [];
PID = {
controller: 0
diff --git a/js/msp.js b/js/msp.js
index db0a6f1d..31b32c1a 100755
--- a/js/msp.js
+++ b/js/msp.js
@@ -15,6 +15,8 @@ var MSP_codes = {
MSP_SET_MODE_RANGE: 35,
MSP_RX_CONFIG: 44,
MSP_SET_RX_CONFIG: 45,
+ MSP_LED_COLORS: 46,
+ MSP_SET_LED_COLORS: 47,
MSP_LED_STRIP_CONFIG: 48,
MSP_SET_LED_STRIP_CONFIG: 49,
MSP_ADJUSTMENT_RANGES: 52,
@@ -82,6 +84,7 @@ var MSP_codes = {
MSP_3D: 124,
MSP_RC_DEADBAND: 125,
MSP_SENSOR_ALIGNMENT: 126,
+ MSP_LED_STRIP_MODECOLOR:127,
MSP_SET_RAW_RC: 200,
MSP_SET_RAW_GPS: 201,
@@ -101,6 +104,7 @@ var MSP_codes = {
MSP_SET_RC_DEADBAND: 218,
MSP_SET_RESET_CURR_PID: 219,
MSP_SET_SENSOR_ALIGNMENT: 220,
+ MSP_SET_LED_STRIP_MODECOLOR:221,
// MSP_BIND: 240,
@@ -142,7 +146,9 @@ var MSP = {
unsupported: 0,
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order
- ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c', 'g', 's', 'b'], // in LSB bit order
+ ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c', 'g', 's', 'b', 'l'], // in LSB bit order
+ ledBaseFunctionLetters: ['c', 'f', 'a', 'l', 's', 'g', 'r'], // in LSB bit
+ ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit
last_received_timestamp: null,
analog_last_received_timestamp: null,
@@ -930,49 +936,147 @@ var MSP = {
SENSOR_CONFIG.baro_hardware = data.getUint8(offset++, 1);
SENSOR_CONFIG.mag_hardware = data.getUint8(offset, 1);
break;
+
case MSP_codes.MSP_LED_STRIP_CONFIG:
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"))
+ ledCount = data.byteLength / 4;
+
var offset = 0;
for (var i = 0; offset < data.byteLength && i < ledCount; i++) {
-
- var directionMask = data.getUint16(offset, 1);
- offset += 2;
-
- var directions = [];
- for (var directionLetterIndex = 0; directionLetterIndex < MSP.ledDirectionLetters.length; directionLetterIndex++) {
- if (bit_check(directionMask, directionLetterIndex)) {
- directions.push(MSP.ledDirectionLetters[directionLetterIndex]);
- }
- }
- var functionMask = data.getUint16(offset, 1);
- offset += 2;
-
- var functions = [];
- for (var functionLetterIndex = 0; functionLetterIndex < MSP.ledFunctionLetters.length; functionLetterIndex++) {
- if (bit_check(functionMask, functionLetterIndex)) {
- functions.push(MSP.ledFunctionLetters[functionLetterIndex]);
+ if (semver.lt(CONFIG.apiVersion, "1.17.0")) {
+ var directionMask = data.getUint16(offset, 1);
+ offset += 2;
+
+ var directions = [];
+ for (var directionLetterIndex = 0; directionLetterIndex < MSP.ledDirectionLetters.length; directionLetterIndex++) {
+ if (bit_check(directionMask, directionLetterIndex)) {
+ directions.push(MSP.ledDirectionLetters[directionLetterIndex]);
+ }
}
+
+ var functionMask = data.getUint16(offset, 1);
+ offset += 2;
+
+ var functions = [];
+ for (var functionLetterIndex = 0; functionLetterIndex < MSP.ledFunctionLetters.length; functionLetterIndex++) {
+ if (bit_check(functionMask, functionLetterIndex)) {
+ functions.push(MSP.ledFunctionLetters[functionLetterIndex]);
+ }
+ }
+
+ var led = {
+ directions: directions,
+ functions: functions,
+ x: data.getUint8(offset++, 1),
+ y: data.getUint8(offset++, 1),
+ color: data.getUint8(offset++, 1)
+ };
+
+ LED_STRIP.push(led);
+ } else {
+ var mask = data.getUint32(offset, 1);
+ offset +=4;
+
+ var functionId = (mask >> 8) & 0xF;
+ var functions = [];
+ for (var baseFunctionLetterIndex = 0; baseFunctionLetterIndex < MSP.ledBaseFunctionLetters.length; baseFunctionLetterIndex++) {
+ if (functionId == baseFunctionLetterIndex) {
+ functions.push(MSP.ledBaseFunctionLetters[baseFunctionLetterIndex]);
+ break;
+ }
+ }
+
+ var overlayMask = (mask >> 12) & 0x3F;
+ for (var overlayLetterIndex = 0; overlayLetterIndex < MSP.ledOverlayLetters.length; overlayLetterIndex++) {
+ if (bit_check(overlayMask, overlayLetterIndex)) {
+ functions.push(MSP.ledOverlayLetters[overlayLetterIndex]);
+ }
+ }
+
+ var directionMask = (mask >> 22) & 0x3F;
+ var directions = [];
+ for (var directionLetterIndex = 0; directionLetterIndex < MSP.ledDirectionLetters.length; directionLetterIndex++) {
+ if (bit_check(directionMask, directionLetterIndex)) {
+ directions.push(MSP.ledDirectionLetters[directionLetterIndex]);
+ }
+ }
+ var led = {
+ y: (mask) & 0xF,
+ x: (mask >> 4) & 0xF,
+ functions: functions,
+ color: (mask >> 18) & 0xF,
+ directions: directions,
+ parameters: (mask >> 28) & 0xF
+ };
+
+ LED_STRIP.push(led);
}
-
- var led = {
- directions: directions,
- functions: functions,
- x: data.getUint8(offset++, 1),
- y: data.getUint8(offset++, 1),
- color: data.getUint8(offset++, 1)
- };
-
- LED_STRIP.push(led);
}
-
break;
case MSP_codes.MSP_SET_LED_STRIP_CONFIG:
console.log('Led strip config saved');
break;
+ case MSP_codes.MSP_LED_COLORS:
+
+ LED_COLORS = [];
+
+ var colorCount = data.byteLength / 4;
+
+ var offset = 0;
+ for (var i = 0; offset < data.byteLength && i < colorCount; i++) {
+
+ var h = data.getUint16(offset, 1);
+ var s = data.getUint8(offset + 2, 1);
+ var v = data.getUint8(offset + 3, 1);
+ offset += 4;
+
+ var color = {
+ h: h,
+ s: s,
+ v: v
+ };
+
+ LED_COLORS.push(color);
+ }
+
+ break;
+ case MSP_codes.MSP_SET_LED_COLORS:
+ console.log('Led strip colors saved');
+ break;
+ case MSP_codes.MSP_LED_STRIP_MODECOLOR:
+ if (semver.gte(CONFIG.apiVersion, "1.17.0")) {
+
+ LED_MODE_COLORS = [];
+
+ var colorCount = data.byteLength / 3;
+
+ var offset = 0;
+ for (var i = 0; offset < data.byteLength && i < colorCount; i++) {
+
+ var mode = data.getUint8(offset++, 1);
+ var direction = data.getUint8(offset++, 1);
+ var color = data.getUint8(offset++, 1);
+
+ var mode_color = {
+ mode: mode,
+ direction: direction,
+ color: color
+ };
+
+ LED_MODE_COLORS.push(mode_color);
+ }
+ }
+ break;
+ case MSP_codes.MSP_SET_LED_STRIP_MODECOLOR:
+ console.log('Led strip mode colors saved');
+ break;
+
+
+
case MSP_codes.MSP_DATAFLASH_SUMMARY:
if (data.byteLength >= 13) {
var
@@ -1721,36 +1825,88 @@ MSP.sendLedStripConfig = function(onCompleteCallback) {
function send_next_led_strip_config() {
var led = LED_STRIP[ledIndex];
-
+ /*
+ var led = {
+ directions: directions,
+ functions: functions,
+ x: data.getUint8(offset++, 1),
+ y: data.getUint8(offset++, 1),
+ color: data.getUint8(offset++, 1)
+ };
+ */
var buffer = [];
buffer.push(ledIndex);
- var directionMask = 0;
- for (var directionLetterIndex = 0; directionLetterIndex < led.directions.length; directionLetterIndex++) {
- var bitIndex = MSP.ledDirectionLetters.indexOf(led.directions[directionLetterIndex]);
- if (bitIndex >= 0) {
- directionMask = bit_set(directionMask, bitIndex);
+ if (semver.lt(CONFIG.apiVersion, "1.17.0")) {
+ var directionMask = 0;
+ for (var directionLetterIndex = 0; directionLetterIndex < led.directions.length; directionLetterIndex++) {
+ var bitIndex = MSP.ledDirectionLetters.indexOf(led.directions[directionLetterIndex]);
+ if (bitIndex >= 0) {
+ directionMask = bit_set(directionMask, bitIndex);
+ }
}
- }
- buffer.push(specificByte(directionMask, 0));
- buffer.push(specificByte(directionMask, 1));
-
- var functionMask = 0;
- for (var functionLetterIndex = 0; functionLetterIndex < led.functions.length; functionLetterIndex++) {
- var bitIndex = MSP.ledFunctionLetters.indexOf(led.functions[functionLetterIndex]);
- if (bitIndex >= 0) {
- functionMask = bit_set(functionMask, bitIndex);
+ buffer.push(specificByte(directionMask, 0));
+ buffer.push(specificByte(directionMask, 1));
+
+ var functionMask = 0;
+ for (var functionLetterIndex = 0; functionLetterIndex < led.functions.length; functionLetterIndex++) {
+ var bitIndex = MSP.ledFunctionLetters.indexOf(led.functions[functionLetterIndex]);
+ if (bitIndex >= 0) {
+ functionMask = bit_set(functionMask, bitIndex);
+ }
}
+ buffer.push(specificByte(functionMask, 0));
+ buffer.push(specificByte(functionMask, 1));
+
+ buffer.push(led.x);
+ buffer.push(led.y);
+
+ buffer.push(led.color);
+ } else {
+ var mask = 0;
+ /*
+ ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order
+ ledFunctionLetters: ['i', 'w', 'f', 'a', 't', 'r', 'c', 'g', 's', 'b', 'l'], // in LSB bit order
+ ledBaseFunctionLetters: ['c', 'f', 'a', 'l', 's', 'g', 'r'], // in LSB bit
+ ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit
+
+ */
+ mask |= (led.y << 0);
+ mask |= (led.x << 4);
+
+ for (var functionLetterIndex = 0; functionLetterIndex < led.functions.length; functionLetterIndex++) {
+ var fnIndex = MSP.ledBaseFunctionLetters.indexOf(led.functions[functionLetterIndex]);
+ if (fnIndex >= 0) {
+ mask |= (fnIndex << 8);
+ break;
+ }
+ }
+
+ for (var overlayLetterIndex = 0; overlayLetterIndex < led.functions.length; overlayLetterIndex++) {
+ var bitIndex = MSP.ledOverlayLetters.indexOf(led.functions[overlayLetterIndex]);
+ if (bitIndex >= 0) {
+ mask |= bit_set(mask, bitIndex + 12);
+ }
+ }
+
+ mask |= (led.color << 18);
+
+ for (var directionLetterIndex = 0; directionLetterIndex < led.directions.length; directionLetterIndex++) {
+ var bitIndex = MSP.ledDirectionLetters.indexOf(led.directions[directionLetterIndex]);
+ if (bitIndex >= 0) {
+ mask |= bit_set(mask, bitIndex + 22);
+ }
+ }
+
+ mask |= (0 << 28); // parameters
+
+
+ buffer.push(specificByte(mask, 0));
+ buffer.push(specificByte(mask, 1));
+ buffer.push(specificByte(mask, 2));
+ buffer.push(specificByte(mask, 3));
}
- buffer.push(specificByte(functionMask, 0));
- buffer.push(specificByte(functionMask, 1));
-
- buffer.push(led.x);
- buffer.push(led.y);
-
- buffer.push(led.color);
-
// prepare for next iteration
ledIndex++;
@@ -1762,6 +1918,54 @@ MSP.sendLedStripConfig = function(onCompleteCallback) {
}
}
+MSP.sendLedStripColors = function(onCompleteCallback) {
+ if (LED_COLORS.length == 0) {
+ onCompleteCallback();
+ } else {
+ var buffer = [];
+
+ for (var colorIndex = 0; colorIndex < LED_COLORS.length; colorIndex++) {
+ var color = LED_COLORS[colorIndex];
+
+ buffer.push(specificByte(color.h, 0));
+ buffer.push(specificByte(color.h, 1));
+ buffer.push(color.s);
+ buffer.push(color.v);
+ }
+ MSP.send_message(MSP_codes.MSP_SET_LED_COLORS, buffer, false, onCompleteCallback);
+ }
+}
+
+MSP.sendLedStripModeColors = function(onCompleteCallback) {
+
+ var nextFunction = send_next_led_strip_mode_color;
+ var index = 0;
+
+ if (LED_MODE_COLORS.length == 0) {
+ onCompleteCallback();
+ } else {
+ send_next_led_strip_mode_color();
+ }
+
+ function send_next_led_strip_mode_color() {
+ var buffer = [];
+
+ var mode_color = LED_MODE_COLORS[index];
+
+ buffer.push(mode_color.mode);
+ buffer.push(mode_color.direction);
+ buffer.push(mode_color.color);
+
+ // prepare for next iteration
+ index++;
+ if (index == LED_MODE_COLORS.length) {
+ nextFunction = onCompleteCallback;
+ }
+
+ MSP.send_message(MSP_codes.MSP_SET_LED_STRIP_MODECOLOR, buffer, false, nextFunction);
+ }
+}
+
MSP.serialPortFunctionMaskToFunctions = function(functionMask) {
var functions = [];
diff --git a/tabs/led_strip.css b/tabs/led_strip.css
index cec6f085..0fc4a277 100644
--- a/tabs/led_strip.css
+++ b/tabs/led_strip.css
@@ -32,10 +32,16 @@
cursor: pointer;
}
-.tab-led-strip .gPoint.function-w { /* Warning */
- background: red;
+.tab-led-strip .gPoint.function-s { /* RSSI */
+ background: brown;
box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: red;
+ border-color: rgb(52, 155, 255);
+}
+
+.tab-led-strip .gPoint.function-c { /* Color */
+ background: linear-gradient( to bottom right, rgba(255, 0, 0, .5) 0%, rgba(255, 255, 0, 0.5) 15%, rgba(0, 255, 0, .5) 30%, rgba(0, 255, 255, .5) 50%, rgba(0, 0, 255, .5) 65%, rgba(255, 0, 255, .5) 80%, rgba(255, 0, 0, .5) 100%);
+ box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
+ border-color: grey;
}
.tab-led-strip .gPoint.function-f { /* Flight mode & orientation */
@@ -44,28 +50,16 @@
border-color: rgb(50, 205, 50);
}
-.tab-led-strip .gPoint.function-i { /* Indicator */
- background: yellow;
- box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: yellow;
-}
-
.tab-led-strip .gPoint.function-a { /* Armed Mode */
background: rgb(52, 155, 255);
box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
border-color: rgb(52, 155, 255);
}
-.tab-led-strip .gPoint.function-t { /* Thrust Mode */
- background: orange;
+.tab-led-strip .gPoint.function-l { /* Battery */
+ background: magenta;
box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: orange;
-}
-
-.tab-led-strip .gPoint.function-c { /* Color */
- background: linear-gradient( to bottom right, rgba(255, 0, 0, .5) 0%, rgba(255, 255, 0, 0.5) 15%, rgba(0, 255, 0, .5) 30%, rgba(0, 255, 255, .5) 50%, rgba(0, 0, 255, .5) 65%, rgba(255, 0, 255, .5) 80%, rgba(255, 0, 0, .5) 100%);
- box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: grey;
+ border-color: rgb(52, 155, 255);
}
.tab-led-strip .gPoint.function-r { /* Ring */
@@ -80,49 +74,70 @@
border-color: rgb(52, 155, 255);
}
-.tab-led-strip .gPoint.function-s { /* RSSI */
- background: brown;
- box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: rgb(52, 155, 255);
+.tab-led-strip .gPoint.function-c .overlay-color,
+.tab-led-strip .gPoint.function-r .overlay-color {
+ float: left;
+ height: 15px;
+ width: 15px;
+ margin-top: -23px;
+ margin-left: 4px;
+ border-radius: 4px;
}
-.tab-led-strip .gPoint.function-b { /* Blink */
- background: white;
- box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
- border-color: rgb(52, 155, 255);
+.tab-led-strip .gPoint.function-s .overlay-s,
+.tab-led-strip .gPoint.function-w .overlay-w,
+.tab-led-strip .gPoint.function-i .overlay-i,
+.tab-led-strip .gPoint.function-t .overlay-t,
+.tab-led-strip .gPoint.function-o .overlay-o,
+.tab-led-strip .gPoint.function-b .overlay-b,
+.tab-led-strip .gPoint.function-n .overlay-n {
+ float: left;
+ height: 6px;
+ width: 16px;
}
-.tab-led-strip .gPoint.function-i.function-f {
- background: linear-gradient(to bottom, yellow 0%,yellow 50%,rgb(50, 205, 50) 50%, rgb(50, 205, 50) 100%);
+.tab-led-strip .gPoint.function-w .overlay-w {
+ background-image: radial-gradient(1px at 8px 50% , red 0%, red 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -30px;
+ margin-left: -9px;
}
-.tab-led-strip .gPoint.function-i.function-a {
- background: linear-gradient(to bottom, yellow 0%,yellow 50%,rgb(52, 155, 255) 50%, rgb(52, 155, 255) 100%);
+.tab-led-strip .gPoint.function-i .overlay-i {
+ background-image: radial-gradient(1px at 8px 50% , yellow 0%, yellow 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -30px;
+ margin-left: 16px;
}
-.tab-led-strip .gPoint.function-i.function-f.function-a {
- background: linear-gradient(to bottom, yellow 0%,yellow 33%,rgb(50, 205, 50) 33%, rgb(50, 205, 50) 66%, rgb(52, 155, 255) 66%, rgb(52, 155, 255) 100%);
+.tab-led-strip .gPoint.function-t .overlay-t {
+ background-image: radial-gradient(1px at 8px 50% , orange 0%, orange 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -6px;
+ margin-left: -9px;
}
-.tab-led-strip .gPoint.function-i.function-w.function-a {
- background: linear-gradient(to bottom, yellow 0%,yellow 33%,red 33%, red 66%, rgb(52, 155, 255) 66%, rgb(52, 155, 255) 100%);
+.tab-led-strip .gPoint.function-s .overlay-s {
+ background-image: radial-gradient(1px at 8px 50% , brown 0%, brown 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -6px;
+ margin-left: 16px;
}
-.tab-led-strip .gPoint.function-t.function-f.function-w {
- background: linear-gradient(to bottom, orange 0%,orange 33%,rgb(50, 205, 50) 33%, rgb(50, 205, 50) 66%, red 66%, red 100%);
+.tab-led-strip .gPoint.function-o .overlay-o {
+ background-image: radial-gradient(1px at 8px 50% , brown 0%, brown 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -6px;
+ margin-left: 16px;
}
-.tab-led-strip .gPoint.function-i.function-w {
- background: linear-gradient(to bottom, yellow 0%,yellow 50%,#ff5454 50%,#ba3535 100%);
+.tab-led-strip .gPoint.function-b .overlay-b {
+ background-image: radial-gradient(1px at 8px 50% , rgb(52, 155, 255) 0%, rgb(52, 155, 255) 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -18px;
+ margin-left: -9px;
}
-.tab-led-strip .gPoint.function-f.function-w {
- background: linear-gradient(to bottom, rgb(50, 205, 50) 0%,rgb(50, 205, 50) 50%,#ff5454 50%,#ba3535 100%);
+.tab-led-strip .gPoint.function-n .overlay-n {
+ background-image: radial-gradient(1px at 8px 50% , blue 0%, blue 2px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0) 4px);
+ margin-top: -18px;
+ margin-left: 16px;
}
-.tab-led-strip .gPoint.function-f.function-t {
- background: linear-gradient(to bottom, rgb(50, 205, 50) 0%,rgb(50, 205, 50) 50%,orange 50%,orange 100%);
-}
.tab-led-strip .gPoint select {
background: #000;
@@ -181,18 +196,45 @@
width: 49%;
}
-.tab-led-strip .functions .function-w.btnOn {background: red;}
-.tab-led-strip .functions .function-f.btnOn {background: rgb(50, 205, 50);}
-.tab-led-strip .functions .function-i.btnOn {background: yellow; color: #333;}
-.tab-led-strip .functions .function-a.btnOn {background: #0084ff;}
-.tab-led-strip .functions .function-t.btnOn {background: orange;}
-.tab-led-strip .functions .function-r.btnOn {background: #acacac;}
-.tab-led-strip .functions .function-c.btnOn {
+/* Drop-down boxes */
+
+.tab-led-strip .select { background: white;}
+.tab-led-strip .select .function-c {
background: linear-gradient( to bottom right, rgba(255, 0, 0, .5) 0%, rgba(255, 255, 0, 0.5) 15%, rgba(0, 255, 0, .5) 30%, rgba(0, 255, 255, .5) 50%, rgba(0, 0, 255, .5) 65%, rgba(255, 0, 255, .5) 80%, rgba(255, 0, 0, .5) 100%);
}
-.tab-led-strip .functions .function-g.btnOn {background: green;}
-.tab-led-strip .functions .function-s.btnOn {background: brown;}
-.tab-led-strip .functions .function-b.btnOn {background: white;}
+
+.tab-led-strip .select .function-f { background: rgb(50, 205, 50);}
+.tab-led-strip .select .function-a { background: rgb(52, 155, 255);}
+.tab-led-strip .select .function-l { background: magenta;}
+.tab-led-strip .select .function-s { background: brown;}
+.tab-led-strip .select .function-g { background: green;}
+/* .tab-led-strip .select .function-b { background: white; color:black;} */
+.tab-led-strip .select .function-r { background: #acacac;}
+
+.tab-led-strip .select .functionSelect option {
+ background: white;
+ color: black;
+}
+
+
+.tab-led-strip .overlays,
+.tab-led-strip .blinkers,
+.tab-led-strip .modifiers {
+ display: inline-block;
+}
+
+.tab-led-strip .colorDefineSliders {
+ display: inline-block;
+ position: absolute;
+ z-index: 10000;
+ background: white;
+ padding: 5px;
+ margin: 10px;
+ border-color: #565656;
+ border-style: solid;
+ border-radius: 6px;
+ border-width: 2px;
+}
.tab-led-strip .color-1 {background: white;}
.tab-led-strip .color-2 {background: red;}
@@ -210,8 +252,9 @@
.tab-led-strip .directions button.btnOn,
-.tab-led-strip .functions button.btnOn,
-.tab-led-strip .colors .btnOn {
+.tab-led-strip .colors .btnOn,
+.tab-led-strip .special_colors button.btnOn,
+.tab-led-strip .mode_colors button.btnOn {
border-color: #000;
}
@@ -291,6 +334,14 @@
position: relative;
float: left;
width: 285px;
+ margin-right: 10px;
+}
+
+.colorDefineSliderValue,
+.colorDefineSliderLabel {
+ width: 10px;
+ display: inline-table;
+ margin-bottom: 5px;
}
.tab-led-strip .directions,
diff --git a/tabs/led_strip.html b/tabs/led_strip.html
index 105cb8b3..27ade963 100644
--- a/tabs/led_strip.html
+++ b/tabs/led_strip.html
@@ -28,6 +28,24 @@
LEDs without wire ordering number will not be saved.