1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

Add support to configure LED strip to modify color with RC channel

This commit is contained in:
Jeff Hendrix 2021-11-19 16:13:40 -07:00
parent 2730bfdd69
commit b032fac62d
5 changed files with 21 additions and 4 deletions

View file

@ -72,7 +72,7 @@ var MSP = {
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order 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 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 ledBaseFunctionLetters: ['c', 'f', 'a', 'l', 's', 'g', 'r', 'h'], // in LSB bit
ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit
last_received_timestamp: null, last_received_timestamp: null,

View file

@ -2664,7 +2664,7 @@ var mspHelper = (function (gui) {
/* /*
ledDirectionLetters: ['n', 'e', 's', 'w', 'u', 'd'], // in LSB bit order 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 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 ledBaseFunctionLetters: ['c', 'f', 'a', 'l', 's', 'g', 'r', 'h'], // in LSB bit
ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit ledOverlayLetters: ['t', 'o', 'b', 'n', 'i', 'w'], // in LSB bit
*/ */

View file

@ -74,6 +74,12 @@
border-color: rgb(52, 155, 255); border-color: rgb(52, 155, 255);
} }
.tab-led-strip .gPoint.function-h { /* Channel */
background: skyblue;
box-shadow: inset 0 0 30px rgba(0, 0, 0, .7);
border-color: black;
}
.tab-led-strip .gPoint.function-c .overlay-color, .tab-led-strip .gPoint.function-c .overlay-color,
.tab-led-strip .gPoint.function-r .overlay-color { .tab-led-strip .gPoint.function-r .overlay-color {
float: left; float: left;
@ -210,6 +216,7 @@
.tab-led-strip .select .function-g { background: green;} .tab-led-strip .select .function-g { background: green;}
/* .tab-led-strip .select .function-b { background: white; color:black;} */ /* .tab-led-strip .select .function-b { background: white; color:black;} */
.tab-led-strip .select .function-r { background: #acacac;} .tab-led-strip .select .function-r { background: #acacac;}
.tab-led-strip .select .function-h { background: skyblue;}
.tab-led-strip .select .functionSelect option { .tab-led-strip .select .functionSelect option {
background: white; background: white;

View file

@ -65,6 +65,7 @@
<option value="function-s" class="extra_functions20">RSSI</option> <option value="function-s" class="extra_functions20">RSSI</option>
<option value="function-g" class="extra_functions20">GPS</option> <option value="function-g" class="extra_functions20">GPS</option>
<option value="function-r" class="">Ring</option> <option value="function-r" class="">Ring</option>
<option value="function-h" class="channel_info">Channel</option>
</select> </select>
</div> </div>
@ -105,6 +106,10 @@
</div> </div>
</div> </div>
<div class="channel_info">
<span class="color_section">Select Channel from color list</span>
</div>
<div class="mode_colors"> <div class="mode_colors">
<div class="section">Mode colors</div> <div class="section">Mode colors</div>

View file

@ -17,7 +17,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
TABS.led_strip.overlays = ['t', 's', 'i', 'w']; TABS.led_strip.overlays = ['t', 's', 'i', 'w'];
} else { } else {
TABS.led_strip.functions = ['i', 'w', 'f', 'a', 't', 'r', 'c', 'g', 's', 'b', 'l', 'o', 'n']; TABS.led_strip.functions = ['i', 'w', 'f', 'a', 't', 'r', 'c', 'g', 's', 'b', 'l', 'o', 'n'];
TABS.led_strip.baseFuncs = ['c', 'f', 'a', 'l', 's', 'g', 'r']; TABS.led_strip.baseFuncs = ['c', 'f', 'a', 'l', 's', 'g', 'r', 'h'];
TABS.led_strip.overlays = ['t', 'o', 'b', 'n', 'i', 'w']; TABS.led_strip.overlays = ['t', 'o', 'b', 'n', 'i', 'w'];
} }
@ -733,7 +733,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
case "function-r": case "function-r":
case "function-o": case "function-o":
case "function-g": case "function-g":
return true; return true;
break; break;
} }
} }
@ -799,6 +799,7 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
$('.modifiers').hide(); $('.modifiers').hide();
$('.blinkers').hide(); $('.blinkers').hide();
$('.warningOverlay').hide(); $('.warningOverlay').hide();
$('.channel_info').hide();
if (areOverlaysActive(activeFunction)) if (areOverlaysActive(activeFunction))
$('.overlays').show(); $('.overlays').show();
@ -867,6 +868,10 @@ TABS.led_strip.initialize = function (callback, scrollPosition) {
$('.mode_color-6-0').show(); // disarmed $('.mode_color-6-0').show(); // disarmed
$('.mode_color-6-1').show(); // armed $('.mode_color-6-1').show(); // armed
break; break;
case "function-h": // Channel
$('.special_colors').hide();
$('.channel_info').show();
break;
case "function-r": // Ring case "function-r": // Ring
default: default: