mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2024-11-23 23:00:57 +01:00
Probing mode improvements
This commit is contained in:
parent
2a274928a9
commit
7ad7f2ce57
@ -510,11 +510,16 @@ int scanRows(int pin, bool clearLastFound)
|
|||||||
|
|
||||||
if (gp18read == probe)
|
if (gp18read == probe)
|
||||||
{
|
{
|
||||||
return -18;
|
delayMicroseconds(1000);
|
||||||
|
if (readFloatingOrState(18, -1) == probe)
|
||||||
|
{
|
||||||
|
return -18;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pinMode(19, INPUT);
|
pinMode(19, INPUT);
|
||||||
delayMicroseconds(400);
|
delayMicroseconds(900);
|
||||||
int probeRead = readFloatingOrState(19, -1);
|
int probeRead = readFloatingOrState(19, -1);
|
||||||
|
|
||||||
if (probeRead == high && ((lastFound[0] != SUPPLY_3V3 )))
|
if (probeRead == high && ((lastFound[0] != SUPPLY_3V3 )))
|
||||||
@ -561,12 +566,12 @@ int scanRows(int pin, bool clearLastFound)
|
|||||||
|
|
||||||
if (justCleared && found != -1)
|
if (justCleared && found != -1)
|
||||||
{
|
{
|
||||||
Serial.print("\n\rjustCleared: ");
|
// Serial.print("\n\rjustCleared: ");
|
||||||
Serial.println(justCleared);
|
// Serial.println(justCleared);
|
||||||
Serial.print("nextIsSupply: ");
|
// Serial.print("nextIsSupply: ");
|
||||||
Serial.println(nextIsSupply);
|
// Serial.println(nextIsSupply);
|
||||||
Serial.print("nextIsGnd: ");
|
// Serial.print("nextIsGnd: ");
|
||||||
Serial.println(nextIsGnd);
|
// Serial.println(nextIsGnd);
|
||||||
|
|
||||||
justCleared = 0;
|
justCleared = 0;
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ int baudRate = 115200;
|
|||||||
unsigned long probingTimer = 0;
|
unsigned long probingTimer = 0;
|
||||||
int restoredNodeFile = 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()
|
void loop()
|
||||||
{
|
{
|
||||||
@ -183,15 +183,19 @@ dontshowmenu:
|
|||||||
// //clearNodeFile();
|
// //clearNodeFile();
|
||||||
// goto skipinput;
|
// goto skipinput;
|
||||||
// }
|
// }
|
||||||
if (millis() % 100 == 0)
|
if (millis() % 300 == 0)
|
||||||
{
|
{
|
||||||
startProbe();
|
startProbe();
|
||||||
if (readFloatingOrState(18) == 3)
|
if (readFloatingOrState(18) == 3)
|
||||||
{
|
{
|
||||||
|
delayMicroseconds(1000);
|
||||||
|
if (readFloatingOrState(18) == 3)
|
||||||
|
{
|
||||||
input = 'p';
|
input = 'p';
|
||||||
probingTimer = millis();
|
probingTimer = millis();
|
||||||
// delay(500);
|
// delay(500);
|
||||||
goto skipinput;
|
goto skipinput;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pinMode(19, INPUT);
|
pinMode(19, INPUT);
|
||||||
}
|
}
|
||||||
@ -277,14 +281,15 @@ skipinput:
|
|||||||
int row = 0;
|
int row = 0;
|
||||||
while (Serial.available() == 0)
|
while (Serial.available() == 0)
|
||||||
{
|
{
|
||||||
delayMicroseconds(9700);
|
delayMicroseconds(1700);
|
||||||
row = scanRows(0);
|
row = scanRows(0);
|
||||||
|
|
||||||
if (row != -1)
|
if (row != -1)
|
||||||
{
|
{
|
||||||
if (row == -18 && millis() - probingTimer > 800)
|
if (row == -18 && millis() - probingTimer > 500)
|
||||||
{
|
{
|
||||||
Serial.print("\n\rCommitting paths!\n\r");
|
Serial.print("\n\rCommitting paths!\n\r");
|
||||||
|
probingTimer = millis();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (row == -18)
|
else if (row == -18)
|
||||||
@ -392,7 +397,7 @@ skipinput:
|
|||||||
// Serial.print("bridgesToPaths\n\r");
|
// Serial.print("bridgesToPaths\n\r");
|
||||||
delay(18);
|
delay(18);
|
||||||
// showNets();
|
// showNets();
|
||||||
rawOtherColors[1] = 0x550008;
|
rawOtherColors[1] = 0x350004;
|
||||||
sendAllPathsCore2 = 1;
|
sendAllPathsCore2 = 1;
|
||||||
delay(25);
|
delay(25);
|
||||||
pinMode(19, INPUT);
|
pinMode(19, INPUT);
|
||||||
|
Loading…
Reference in New Issue
Block a user