40 {0, LED_JETT_RO_1}, {3, LED_JETT_RO_1}, {1, LED_JETT_RO_2}, {2, LED_JETT_RO_2},
42 {4, LED_JETT_RI_1}, {7, LED_JETT_RI_1}, {5, LED_JETT_RI_2}, {6, LED_JETT_RI_2},
44 {11, LED_JETT_CTR_1}, {8, LED_JETT_CTR_1}, {10, LED_JETT_CTR_2}, {9, LED_JETT_CTR_2},
46 {14, LED_JETT_LI_1}, {13, LED_JETT_LI_1}, {12, LED_JETT_LI_2}, {15, LED_JETT_LI_2},
48 {18, LED_JETT_LO_1}, {17, LED_JETT_LO_1}, {16, LED_JETT_LO_2}, {19, LED_JETT_LO_2},
52 {23, LED_JETT_LEFT}, {24, LED_JETT_LEFT}, {21, LED_JETT_RIGHT}, {22, LED_JETT_RIGHT},
54 {25, LED_JETT_HALF}, {26, LED_JETT_HALF}, {27, LED_JETT_FULL}, {28, LED_JETT_FULL},
92 panelStartIndex = startIndex;
93 this->ledStrip = ledStrip;
94 ledCount = JETT_STATION_LED_COUNT;
95 ledTable = jettStationLedTable;
101 static void onSjRoLtChange(
unsigned int newValue) {
102 if (instance) instance->
setIndicatorColor(LED_JETT_RO_1, newValue ? NVIS_WHITE : NVIS_BLACK);
104 DcsBios::IntegerBuffer sjRoLtBuffer{FA_18C_hornet_SJ_RO_LT, onSjRoLtChange};
106 static void onSjRiLtChange(
unsigned int newValue) {
107 if (instance) instance->
setIndicatorColor(LED_JETT_RI_1, newValue ? NVIS_WHITE : NVIS_BLACK);
109 DcsBios::IntegerBuffer sjRiLtBuffer{FA_18C_hornet_SJ_RI_LT, onSjRiLtChange};
111 static void onSjCtrLtChange(
unsigned int newValue) {
112 if (instance) instance->
setIndicatorColor(LED_JETT_CTR_1, newValue ? NVIS_WHITE : NVIS_BLACK);
114 DcsBios::IntegerBuffer sjCtrLtBuffer{FA_18C_hornet_SJ_CTR_LT, onSjCtrLtChange};
116 static void onSjLiLtChange(
unsigned int newValue) {
117 if (instance) instance->
setIndicatorColor(LED_JETT_LI_1, newValue ? NVIS_WHITE : NVIS_BLACK);
119 DcsBios::IntegerBuffer sjLiLtBuffer{FA_18C_hornet_SJ_LI_LT, onSjLiLtChange};
121 static void onSjLoLtChange(
unsigned int newValue) {
122 if (instance) instance->
setIndicatorColor(LED_JETT_LO_1, newValue ? NVIS_WHITE : NVIS_BLACK);
124 DcsBios::IntegerBuffer sjLoLtBuffer{FA_18C_hornet_SJ_LO_LT, onSjLoLtChange};
127 static void onFlpLgNoseGearLtChange(
unsigned int newValue) {
128 if (instance) instance->
setIndicatorColor(LED_JETT_NOSE, newValue ? NVIS_GREEN_A : NVIS_BLACK);
130 DcsBios::IntegerBuffer flpLgNoseGearLtBuffer{FA_18C_hornet_FLP_LG_NOSE_GEAR_LT, onFlpLgNoseGearLtChange};
132 static void onFlpLgRightGearLtChange(
unsigned int newValue) {
133 if (instance) instance->
setIndicatorColor(LED_JETT_RIGHT, newValue ? NVIS_GREEN_A : NVIS_BLACK);
135 DcsBios::IntegerBuffer flpLgRightGearLtBuffer{FA_18C_hornet_FLP_LG_RIGHT_GEAR_LT, onFlpLgRightGearLtChange};
137 static void onFlpLgLeftGearLtChange(
unsigned int newValue) {
138 if (instance) instance->
setIndicatorColor(LED_JETT_LEFT, newValue ? NVIS_GREEN_A : NVIS_BLACK);
140 DcsBios::IntegerBuffer flpLgLeftGearLtBuffer{FA_18C_hornet_FLP_LG_LEFT_GEAR_LT, onFlpLgLeftGearLtChange};
142 static void onFlpLgHalfFlapsLtChange(
unsigned int newValue) {
143 if (instance) instance->
setIndicatorColor(LED_JETT_HALF, newValue ? NVIS_GREEN_A : NVIS_BLACK);
145 DcsBios::IntegerBuffer flpLgHalfFlapsLtBuffer{FA_18C_hornet_FLP_LG_HALF_FLAPS_LT, onFlpLgHalfFlapsLtChange};
147 static void onFlpLgFullFlapsLtChange(
unsigned int newValue) {
148 if (instance) instance->
setIndicatorColor(LED_JETT_FULL, newValue ? NVIS_GREEN_A : NVIS_BLACK);
150 DcsBios::IntegerBuffer flpLgFullFlapsLtBuffer{FA_18C_hornet_FLP_LG_FULL_FLAPS_LT, onFlpLgFullFlapsLtChange};
152 static void onFlpLgFlapsLtChange(
unsigned int newValue) {
153 if (instance) instance->
setIndicatorColor(LED_JETT_FLAPS, newValue ? NVIS_YELLOW : NVIS_BLACK);
155 DcsBios::IntegerBuffer flpLgFlapsLtBuffer{FA_18C_hornet_FLP_LG_FLAPS_LT, onFlpLgFlapsLtChange};
159 unsigned int cockpitLightMode = 0;
160 bool instrIntLtActive =
false;
163 void updateJettStationLeds() {
164 if (!instance)
return;
169 CRGB activeColor = (cockpitLightMode >= 1) ? NVIS_GREEN_A : NVIS_WHITE;
170 CRGB targetColor = instrIntLtActive ? activeColor : NVIS_BLACK;
182 static void onInstrIntLtChange(
unsigned int newValue) {
184 instance->instrIntLtActive = (newValue > 0);
185 instance->updateJettStationLeds();
188 DcsBios::IntegerBuffer instrIntLtBuffer{FA_18C_hornet_INSTR_INT_LT, onInstrIntLtChange};
190 static void onCockkpitLightModeSwChange(
unsigned int newValue) {
192 instance->cockpitLightMode = newValue;
193 instance->updateJettStationLeds();
196 DcsBios::IntegerBuffer cockkpitLightModeSwBuffer{FA_18C_hornet_COCKKPIT_LIGHT_MODE_SW, onCockkpitLightModeSwChange};