Before this commit, I couldn't compile with a SAMD21 chip because of the following error:
/home/sankey/Arduino/libraries/IRLibProtocols/IRLibSAMD21.cpp:108:1: error: narrowing conversion of '(_ETCChannel)-1' from 'short int' to 'uint8_t {aka
unsigned char}' inside { } [-Wnarrowing]
};
^
Not saying this is the correct way to fix the error, it's just how I solved it.
Minimal code example is based on one of the checked-in examples, and is what I used to test this PR:
#include <IRLibDecodeBase.h>
#include <IRLib_P02_Sony.h>
#include <IRLibCombo.h>
IRdecode myDecoder;
#include <IRLibRecv.h>
IRrecv myReceiver(6); //pin number for the receiver
void setup() {
Serial.begin(9600);
delay(2000); while (!Serial); //delay for Leonardo
myReceiver.enableIRIn(); // Start the receiver
Serial.println(F("Ready to receive IR signals"));
}
void loop() {
//Continue looping until you get a complete signal received
if (myReceiver.getResults()) {
myDecoder.decode(); //Decode it
myDecoder.dumpResults(true); //Now print results. Use false for less detail
myReceiver.enableIRIn(); //Restart receiver
}
}
Before this commit, I couldn't compile with a SAMD21 chip because of the following error:
Not saying this is the correct way to fix the error, it's just how I solved it.
Minimal code example is based on one of the checked-in examples, and is what I used to test this PR: