From c957b0e754ecd54c2c06427552eb1702b286c964 Mon Sep 17 00:00:00 2001 From: Kevin Santo Cappuccio Date: Thu, 21 Nov 2024 20:28:22 -0800 Subject: [PATCH] fixed not clearing connections between Wokwi updates --- .../~JumperlessRev3point1.kicad_sch.lck | 1 + JumperlessNano/src/FileParsing.cpp | 2 +- JumperlessNano/src/main.cpp | 17 ++++++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 Hardware/KiCAD/JumperlessRev3point1/~JumperlessRev3point1.kicad_sch.lck diff --git a/Hardware/KiCAD/JumperlessRev3point1/~JumperlessRev3point1.kicad_sch.lck b/Hardware/KiCAD/JumperlessRev3point1/~JumperlessRev3point1.kicad_sch.lck new file mode 100644 index 0000000..e9336e2 --- /dev/null +++ b/Hardware/KiCAD/JumperlessRev3point1/~JumperlessRev3point1.kicad_sch.lck @@ -0,0 +1 @@ +{"hostname":"Kevins-MacBook-Pro","username":"kevinsanto"} \ No newline at end of file diff --git a/JumperlessNano/src/FileParsing.cpp b/JumperlessNano/src/FileParsing.cpp index db758d4..ce2c551 100644 --- a/JumperlessNano/src/FileParsing.cpp +++ b/JumperlessNano/src/FileParsing.cpp @@ -309,7 +309,7 @@ void inputNodeFileList(int addRotaryConnections) { void savePreformattedNodeFile(int source, int slot, int keepEncoder) { - nodeFile = LittleFS.open("nodeFileSlot" + String(slot) + ".txt", "w+"); + nodeFile = LittleFS.open("nodeFileSlot" + String(slot) + ".txt", "w"); // Serial.println("Slot " + String(slot)); // Serial.println(nodeFile); diff --git a/JumperlessNano/src/main.cpp b/JumperlessNano/src/main.cpp index 38798df..b64a0b2 100644 --- a/JumperlessNano/src/main.cpp +++ b/JumperlessNano/src/main.cpp @@ -171,7 +171,7 @@ int readInNodesArduino = 0; int restoredNodeFile = 0; -const char firmwareVersion[] = "1.3.18"; //// remember to update this +const char firmwareVersion[] = "1.3.19"; //// remember to update this int firstLoop = 1; volatile int probeActive = 1; @@ -731,7 +731,7 @@ skipinput: // leds.clear(); // assignNetColors(); digitalWrite(RESETPIN, HIGH); - delayMicroseconds(100); + delayMicroseconds(3900); // Serial.print("bridgesToPaths\n\r"); digitalWrite(RESETPIN, LOW); // showNets(); @@ -759,8 +759,8 @@ skipinput: // sendAllPathsCore2 = 1; timer = millis(); - // clearNodeFile(netSlot); - + //clearNodeFile(netSlot); + digitalWrite(RESETPIN, HIGH); if (connectFromArduino != '\0') { serSource = 1; } else { @@ -773,11 +773,11 @@ skipinput: openNodeFile(netSlot); getNodesToConnect(); // Serial.print("openNF\n\r"); - digitalWrite(RESETPIN, HIGH); + bridgesToPaths(); clearLEDs(); assignNetColors(); - delay(1); + delay(10); // Serial.print("bridgesToPaths\n\r"); digitalWrite(RESETPIN, LOW); // showNets(); @@ -1224,7 +1224,7 @@ void loadFile(int slot) { clearLEDs(); assignNetColors(); digitalWrite(RESETPIN, HIGH); - delayMicroseconds(100); + delayMicroseconds(2000); // Serial.print("bridgesToPaths\n\r"); digitalWrite(RESETPIN, LOW); // showNets(); @@ -1271,6 +1271,9 @@ void loop1() // core 2 handles the LEDs and the CH446Q8 } if (sendAllPathsCore2 == 1) { + digitalWrite(RESETPIN, HIGH); + delayMicroseconds(3900); + digitalWrite(RESETPIN, LOW); delayMicroseconds(6200); sendAllPaths(); delayMicroseconds(2200);