mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2024-11-27 17:00:55 +01:00
Probing mode improvements
This commit is contained in:
parent
2a274928a9
commit
7ad7f2ce57
@ -509,12 +509,17 @@ int scanRows(int pin, bool clearLastFound)
|
||||
int gp18read = readFloatingOrState(18, -1);
|
||||
|
||||
if (gp18read == probe)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
@ -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,16 +183,20 @@ dontshowmenu:
|
||||
// //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 @@ skipinput:
|
||||
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 @@ skipinput:
|
||||
// Serial.print("bridgesToPaths\n\r");
|
||||
delay(18);
|
||||
// showNets();
|
||||
rawOtherColors[1] = 0x550008;
|
||||
rawOtherColors[1] = 0x350004;
|
||||
sendAllPathsCore2 = 1;
|
||||
delay(25);
|
||||
pinMode(19, INPUT);
|
||||
|
Loading…
Reference in New Issue
Block a user