Cleaned up output

This commit is contained in:
Artemio Urbina authored and GitHub committed 2019-01-17 17:49:46 -06:00
1 parent 929d53da6d
commit 73ca73e019
1 file changed
+14 -5
+14 -5
View File
@@ -165,7 +165,7 @@ const char *Game = "BLANK XXXXXX XXX-XXXX"; const PROGMEM uint16_t Enc
// Temp buffer to store input line
#define TEMP_SIZE 512
#define TEMP_SIZE 256
char temp[TEMP_SIZE];
int cBits[8];
@@ -335,9 +335,9 @@ void dataverifyfastdo()
digitalWrite(RW, HIGH); digitalWrite(AD1, HIGH); // activate D0 INPUT
pinMode(D0, INPUT);
differences = 0;
p("Verifying, please wait\r\n");
for (int c=0; c <= 8191; c++) {
float voltage = readportanalog(D0);
cByte = pgm_read_byte_near(EncryptionKey + c);
if (parity(cByte) != digitalRead(D0))
differences ++;
@@ -348,8 +348,8 @@ void dataverifyfastdo()
p("Verified OK\r\n");
else
{
p("Veify FAILED, Number of differences: "); Serial.print(differences);
p("\r\n");
p("Verify FAILED, Number of differences: "); Serial.print(differences);
p(" out of 8192\r\nRun with 'v' for full report\r\n");
}
}
@@ -391,6 +391,15 @@ void dataverify()
p(" Reset HIGH\r\n"); resethi();
}
void dataverifyfast()
{
p(" Start \r\n");
p(" Reset LOW\r\n"); resetlo();
p(" Setup\r\n"); setupinit();
p(" Working...\r\n"); dataverifyfastdo();
p(" Cleanup\r\n"); setupcleanup();
p(" Reset HIGH\r\n"); resethi();
}
void datawrite()
{
@@ -494,7 +503,7 @@ void loop()
if (temp[0]=='c')
{
p("Data Verify...\r\n");
dataverifyfastdo();
dataverifyfast();
p("Done!\r\n\r\n");
}
}