From 4272a69aeced0a971edb34336d80095c96875386 Mon Sep 17 00:00:00 2001 From: Kevin Santo Cappuccio Date: Thu, 11 Jan 2024 19:52:12 -0800 Subject: [PATCH] Scale down brightness to work with Jumperlab --- JumperlessNano/src/LEDs.cpp | 14 +++++++------- JumperlessNano/src/MachineCommands.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/JumperlessNano/src/LEDs.cpp b/JumperlessNano/src/LEDs.cpp index eb0ad70..27ade7e 100644 --- a/JumperlessNano/src/LEDs.cpp +++ b/JumperlessNano/src/LEDs.cpp @@ -1180,16 +1180,16 @@ void lightUpRail(int logo, int rail, int onOff, int brightness2, int switchPosit } - leds.setPixelColor(83, rawSpecialNetColors[1]); - leds.setPixelColor(108, rawSpecialNetColors[1]); - leds.setPixelColor(109, rawSpecialNetColors[2]); - leds.setPixelColor(96, rawSpecialNetColors[3]); - leds.setPixelColor(106, rawSpecialNetColors[2]); + leds.setPixelColor(83, scaleDownBrightness( rawSpecialNetColors[1])); + leds.setPixelColor(108,scaleDownBrightness( rawSpecialNetColors[1])); + leds.setPixelColor(109, scaleDownBrightness(rawSpecialNetColors[2])); + leds.setPixelColor(96, scaleDownBrightness(rawSpecialNetColors[3])); + leds.setPixelColor(106, scaleDownBrightness(rawSpecialNetColors[2])); if (switchPosition == 2) //+-8V { - rawRailColors[switchPosition][0] = rawOtherColors[3]; - rawRailColors[switchPosition][2] = rawOtherColors[4]; + rawRailColors[switchPosition][0] = scaleDownBrightness(rawOtherColors[3]); + rawRailColors[switchPosition][2] = scaleDownBrightness(rawOtherColors[4]); } for (int j = 0; j < 4; j++) { diff --git a/JumperlessNano/src/MachineCommands.cpp b/JumperlessNano/src/MachineCommands.cpp index d664ce4..c6ca195 100644 --- a/JumperlessNano/src/MachineCommands.cpp +++ b/JumperlessNano/src/MachineCommands.cpp @@ -195,25 +195,25 @@ void machineNetlistToNetstruct(void) if (netIndex < 8) { - rawSpecialNetColors[netIndex] = scaleDownBrightness(rawColor); + rawSpecialNetColors[netIndex] = rawColor; switch (netIndex) { case 1: for (int i = 0; i < 3; i++) { - rawRailColors[i][1] = scaleDownBrightness(rawColor); - rawRailColors[i][3] = scaleDownBrightness(rawColor); + rawRailColors[i][1] = rawColor; + rawRailColors[i][3] = rawColor; } break; case 2: - rawRailColors[1][0] = scaleDownBrightness(rawColor); - rawRailColors[1][2] = scaleDownBrightness(rawColor); + rawRailColors[1][0] = rawColor; + rawRailColors[1][2] = rawColor; break; case 3: - rawRailColors[0][0] = scaleDownBrightness(rawColor); - rawRailColors[0][2] = scaleDownBrightness(rawColor); + rawRailColors[0][0] = rawColor; + rawRailColors[0][2] = rawColor; break; } }