Skip to content

Commit

Permalink
Update RFSniffer.cpp
Browse files Browse the repository at this point in the history
Fix negative values
  • Loading branch information
SiberaIndustries authored Dec 1, 2022
1 parent 31c0ea4 commit 6328afd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RPi_utils/RFSniffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ int main(int argc, char *argv[]) {

if (mySwitch.available()) {

int value = mySwitch.getReceivedValue();
unsigned long value = mySwitch.getReceivedValue();

if (value == 0) {
printf("Unknown encoding\n");
} else {

printf("Received %i\n", mySwitch.getReceivedValue() );
printf("Received %lu\n", mySwitch.getReceivedValue() );
}

fflush(stdout);
Expand Down

0 comments on commit 6328afd

Please sign in to comment.