add info message

This commit is contained in:
King Kévin 2015-11-11 10:09:39 +01:00
parent cf0df8b102
commit 2924e77619
1 changed files with 2 additions and 4 deletions

View File

@ -88,7 +88,7 @@ int main(int argc, char** argv){
ltime=time(NULL); // get current cal time
char stime[64]; // do display the time
strftime(stime, sizeof(stime), "%F %T %z %Z", localtime(&ltime));
printf("%s: payload received\n",stime);
printf("%s: payload received over radio\n",stime);
uint8_t payload[32]; // buffer to save the payload
uint8_t size = radio.getDynamicPayloadSize();
radio.read(&payload,size);
@ -142,9 +142,7 @@ int main(int argc, char** argv){
}
crc = _crc_ibutton_update(crc, payload[17]); // this is the CRC
if (crc) { // wrong key or IV
#ifdef DEBUG
printf("wrong CRC: expected %d, got %d\n",payload[17],crc);
#endif
printf("wrong CRC. saving IV for next packet\n");
continue;
}
uint8_t invalid[sizeof(values)]; // used to indicate that the values are invalid