mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2024-11-27 17:00:55 +01:00
Fix node file clear and restore, make disambiguation a different color
This commit is contained in:
parent
f0e15a1fd7
commit
a964b61905
@ -44,8 +44,8 @@ int buttonPin = 18;
|
|||||||
|
|
||||||
|
|
||||||
int rainbowList[13][3] = {
|
int rainbowList[13][3] = {
|
||||||
{55, 55, 55},
|
{40, 50, 80},
|
||||||
{10, 45, 30},
|
{88, 33, 70},
|
||||||
{30, 15, 45},
|
{30, 15, 45},
|
||||||
{8, 27, 45},
|
{8, 27, 45},
|
||||||
{45, 18, 19},
|
{45, 18, 19},
|
||||||
@ -435,7 +435,7 @@ int selectFromLastFound(void)
|
|||||||
{
|
{
|
||||||
if (i == selected)
|
if (i == selected)
|
||||||
{
|
{
|
||||||
leds.setPixelColor(nodesToPixelMap[connectedRows[i]], rainbowList[0][0], rainbowList[0][1], rainbowList[0][2]);
|
leds.setPixelColor(nodesToPixelMap[connectedRows[i]], rainbowList[1][0], rainbowList[1][1], rainbowList[1][2]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -450,7 +450,7 @@ int selectFromLastFound(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
leds.setPixelColor(nodesToPixelMap[connectedRows[i]], rainbowList[0][0] / 8, rainbowList[0][1] / 8, rainbowList[0][2] / 8);
|
leds.setPixelColor(nodesToPixelMap[connectedRows[i]], rainbowList[1][0] / 8, rainbowList[1][1] / 8, rainbowList[1][2] / 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -554,7 +554,8 @@ void lastNetConfirm(int forceLastNet)
|
|||||||
assignNetColors();
|
assignNetColors();
|
||||||
|
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
|
Serial.print("\n\r short press BOOTSEL to restore last netlist\n\r");
|
||||||
|
Serial.print(" long press to cancel\n\r");
|
||||||
delay(250);
|
delay(250);
|
||||||
if (BOOTSEL)
|
if (BOOTSEL)
|
||||||
{
|
{
|
||||||
@ -565,12 +566,23 @@ void lastNetConfirm(int forceLastNet)
|
|||||||
{
|
{
|
||||||
if (BOOTSEL)
|
if (BOOTSEL)
|
||||||
bootselPressed = 1;
|
bootselPressed = 1;
|
||||||
clearLEDs();
|
|
||||||
showLEDsCore2 = 1;
|
//clearLEDs();
|
||||||
|
//leds.show();
|
||||||
|
leds.clear();
|
||||||
|
lightUpRail(-1, -1, 1, 28, supplySwitchPosition);
|
||||||
|
leds.show();
|
||||||
|
//showLEDsCore2 = 1;
|
||||||
|
|
||||||
|
|
||||||
if (BOOTSEL)
|
if (BOOTSEL)
|
||||||
bootselPressed = 1;
|
bootselPressed = 1;
|
||||||
|
|
||||||
delay(250);
|
delay(250);
|
||||||
|
|
||||||
|
//showLEDsCore2 = 2;
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
|
//Serial.print("p\n\r");
|
||||||
if (BOOTSEL)
|
if (BOOTSEL)
|
||||||
bootselPressed = 1;
|
bootselPressed = 1;
|
||||||
// delay(250);
|
// delay(250);
|
||||||
@ -583,20 +595,23 @@ void lastNetConfirm(int forceLastNet)
|
|||||||
{
|
{
|
||||||
|
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
|
showLEDsCore2 = 2;
|
||||||
delay(250);
|
delay(250);
|
||||||
clearLEDs();
|
clearLEDs();
|
||||||
showLEDsCore2 = 1;
|
//leds.clear();
|
||||||
|
showLEDsCore2 = 2;
|
||||||
|
|
||||||
if (fade <= 0)
|
if (fade <= 0)
|
||||||
{
|
{
|
||||||
clearAllNTCC();
|
clearAllNTCC();
|
||||||
clearLEDs();
|
clearLEDs();
|
||||||
startupColors();
|
startupColors();
|
||||||
clearNodeFile();
|
//clearNodeFile();
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
lastNetConfirmTimer = millis();
|
lastNetConfirmTimer = millis();
|
||||||
restoredNodeFile = 0;
|
restoredNodeFile = 0;
|
||||||
// delay(1000);
|
// delay(1000);
|
||||||
|
Serial.print("\n\r cancelled\n\r");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -607,6 +622,8 @@ void lastNetConfirm(int forceLastNet)
|
|||||||
digitalWrite(RESETPIN, LOW);
|
digitalWrite(RESETPIN, LOW);
|
||||||
restoredNodeFile = 1;
|
restoredNodeFile = 1;
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
|
Serial.print("\n\r restoring last netlist\n\r");
|
||||||
|
printNodeFile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delay(250);
|
delay(250);
|
||||||
@ -762,7 +779,7 @@ void loop1() // core 2 handles the LEDs and the CH446Q8
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (rails == 1)
|
if (rails == 1 || rails == 2)
|
||||||
{
|
{
|
||||||
lightUpRail(-1, -1, 1, 28, supplySwitchPosition);
|
lightUpRail(-1, -1, 1, 28, supplySwitchPosition);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user