Improve output for recvDumpV2
Added my name to the contributors list (not 'cos I really care for the credit <whatever> but so people know who to "blame" [non-pejorative])
Moved the decode() function to the top of the source as it is likely to be edited the most
This commit is contained in:
Bluechip
2015-06-22 21:23:53 +01:00
parent 845e912e9f
commit 4e5608f25f
4 changed files with 70 additions and 53 deletions

View File

@@ -142,6 +142,22 @@ void dumpCode (decode_results *results)
// Newline
Serial.println("");
// Now dump "known" codes
if (results->decode_type != UNKNOWN) {
// Some protocols have an address
if (results->decode_type == PANASONIC) {
Serial.print("unsigned int addr = 0x");
Serial.print(results->address, HEX);
Serial.println(";");
}
// All protocols have data
Serial.print("unsigned int data = 0x");
Serial.print(results->value, HEX);
Serial.println(";");
}
}
//+=============================================================================