diff --git a/JumperlessNano/src/CH446Q.cpp b/JumperlessNano/src/CH446Q.cpp index 0cb5ab8..44781f0 100644 --- a/JumperlessNano/src/CH446Q.cpp +++ b/JumperlessNano/src/CH446Q.cpp @@ -510,11 +510,16 @@ int scanRows(int pin, bool clearLastFound) if (gp18read == probe) { - return -18; + delayMicroseconds(1000); + if (readFloatingOrState(18, -1) == probe) + { + return -18; + } + } pinMode(19, INPUT); - delayMicroseconds(400); + delayMicroseconds(900); int probeRead = readFloatingOrState(19, -1); if (probeRead == high && ((lastFound[0] != SUPPLY_3V3 ))) @@ -561,12 +566,12 @@ int scanRows(int pin, bool clearLastFound) if (justCleared && found != -1) { -Serial.print("\n\rjustCleared: "); -Serial.println(justCleared); -Serial.print("nextIsSupply: "); -Serial.println(nextIsSupply); -Serial.print("nextIsGnd: "); -Serial.println(nextIsGnd); +// Serial.print("\n\rjustCleared: "); +// Serial.println(justCleared); +// Serial.print("nextIsSupply: "); +// Serial.println(nextIsSupply); +// Serial.print("nextIsGnd: "); +// Serial.println(nextIsGnd); justCleared = 0; } diff --git a/JumperlessNano/src/main.cpp b/JumperlessNano/src/main.cpp index 5a687fd..e2424c0 100644 --- a/JumperlessNano/src/main.cpp +++ b/JumperlessNano/src/main.cpp @@ -132,7 +132,7 @@ int baudRate = 115200; unsigned long probingTimer = 0; int restoredNodeFile = 0; -const char firmwareVersion[] = "1.3.0"; //// remember to update this +const char firmwareVersion[] = "1.3.1"; //// remember to update this void loop() { @@ -183,15 +183,19 @@ void loop() // //clearNodeFile(); // goto skipinput; // } - if (millis() % 100 == 0) + if (millis() % 300 == 0) { startProbe(); if (readFloatingOrState(18) == 3) { + delayMicroseconds(1000); + if (readFloatingOrState(18) == 3) + { input = 'p'; probingTimer = millis(); // delay(500); goto skipinput; + } } pinMode(19, INPUT); } @@ -277,14 +281,15 @@ void loop() int row = 0; while (Serial.available() == 0) { - delayMicroseconds(9700); + delayMicroseconds(1700); row = scanRows(0); if (row != -1) { - if (row == -18 && millis() - probingTimer > 800) + if (row == -18 && millis() - probingTimer > 500) { Serial.print("\n\rCommitting paths!\n\r"); + probingTimer = millis(); break; } else if (row == -18) @@ -392,7 +397,7 @@ void loop() // Serial.print("bridgesToPaths\n\r"); delay(18); // showNets(); - rawOtherColors[1] = 0x550008; + rawOtherColors[1] = 0x350004; sendAllPathsCore2 = 1; delay(25); pinMode(19, INPUT);