Scale down brightness to work with Jumperlab

This commit is contained in:
Kevin Santo Cappuccio 2024-01-11 19:52:12 -08:00
parent bf4a42e8c6
commit 4272a69aec
2 changed files with 14 additions and 14 deletions

View File

@ -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++)
{

View File

@ -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;
}
}