Skip to content

Commit

Permalink
Merge pull request #213 from AnalysIR/master
Browse files Browse the repository at this point in the history
Update IRrecvDumpV2.ino
  • Loading branch information
Rafi Khan committed Aug 28, 2015
2 parents cdd783c + f985c4b commit 55f3e27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/IRrecvDumpV2/IRrecvDumpV2.ino
Expand Up @@ -90,7 +90,7 @@ void dumpRaw (decode_results *results)
{
// Print Raw data
Serial.print("Timing[");
Serial.print(results->rawlen, DEC);
Serial.print(results->rawlen-1, DEC);
Serial.println("]: ");

for (int i = 1; i < results->rawlen; i++) {
Expand All @@ -106,7 +106,7 @@ void dumpRaw (decode_results *results)
if (x < 1000) Serial.print(" ") ;
if (x < 100) Serial.print(" ") ;
Serial.print(x, DEC);
Serial.print(", ");
if (i < results->rawlen-1) Serial.print(", "); //',' not needed for last one
}
if (!(i % 8)) Serial.println("");
}
Expand All @@ -121,18 +121,18 @@ void dumpCode (decode_results *results)
// Start declaration
Serial.print("unsigned int "); // variable type
Serial.print("rawData["); // array name
Serial.print(results->rawlen + 1, DEC); // array size
Serial.print(results->rawlen - 1, DEC); // array size
Serial.print("] = {"); // Start declaration

// Dump data
for (int i = 1; i < results->rawlen; i++) {
Serial.print(results->rawbuf[i] * USECPERTICK, DEC);
Serial.print(",");
if ( i < results->rawlen-1 ) Serial.print(","); // ',' not needed on last one
if (!(i & 1)) Serial.print(" ");
}

// End declaration
Serial.print("0};"); // Turn LED off at the end
Serial.print("};"); //

// Comment
Serial.print(" // ");
Expand Down

0 comments on commit 55f3e27

Please sign in to comment.