Removed default value USE_DEFAULT_FEEDBACK_LED_PIN for last parameter of IRsend::begin(bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin).
This commit is contained in:
parent
f2838859e0
commit
29564e83e1
|
@ -9,6 +9,7 @@ See also the commit log at github: https://github.com/Arduino-IRremote/Arduino-I
|
|||
- Added functions stopTimer(), restartTimer() and restartTimerWithTicksToAdd().
|
||||
- Added rawlen and initialGap to IRData.
|
||||
- Added ReceiveAndSendHobToHood example.
|
||||
- Removed default value USE_DEFAULT_FEEDBACK_LED_PIN for last parameter of IRsend::begin(bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin).
|
||||
|
||||
# 4.2.1
|
||||
- Fix wrong type of tEnableLEDFeedback in IRSend.hpp and IRReceive.hpp.
|
||||
|
|
|
@ -354,18 +354,25 @@ void printIRResultOnLCD() {
|
|||
|
||||
if (IrReceiver.decodedIRData.protocol == UNKNOWN) {
|
||||
/*
|
||||
* Print number of bits received and microseconds of signal
|
||||
* Print number of bits received and hash code or microseconds of signal
|
||||
*/
|
||||
myLCD.setCursor(0, 1);
|
||||
uint8_t tNumberOfBits = (IrReceiver.decodedIRData.rawDataPtr->rawlen + 1) / 2;
|
||||
if (tNumberOfBits < 10) {
|
||||
myLCD.print(' '); // padding space
|
||||
}
|
||||
myLCD.print(tNumberOfBits);
|
||||
uint_fast8_t tPrintedStringLength = myLCD.print(tNumberOfBits);
|
||||
myLCD.print(F(" bit "));
|
||||
uint_fast8_t tDurationStringLength = myLCD.print(IrReceiver.getTotalDurationOfRawData());
|
||||
myLCD.print(F(" \xE4s")); // \xE4 is micro symbol
|
||||
printSpacesOnLCD(7 - tDurationStringLength);
|
||||
|
||||
if (IrReceiver.decodedIRData.decodedRawData != 0) {
|
||||
if (tNumberOfBits < 10) {
|
||||
myLCD.print('0');
|
||||
tPrintedStringLength++;
|
||||
}
|
||||
myLCD.print('x');
|
||||
tPrintedStringLength += myLCD.print(IrReceiver.decodedIRData.decodedRawData, HEX) + 1;
|
||||
} else {
|
||||
tPrintedStringLength += myLCD.print(IrReceiver.getTotalDurationOfRawData());
|
||||
myLCD.print(F(" \xE4s")); // \xE4 is micro symbol
|
||||
}
|
||||
printSpacesOnLCD(11 - tPrintedStringLength);
|
||||
sLastProtocolAddress = 4711;
|
||||
sLastCommand = 44711;
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ void setup() {
|
|||
#endif
|
||||
|
||||
#if defined(IR_SEND_PIN)
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
#else
|
||||
IrSender.begin(3, ENABLE_LED_FEEDBACK, USE_DEFAULT_FEEDBACK_LED_PIN); // Specify send pin and enable feedback LED at default feedback LED pin
|
||||
#endif
|
||||
|
|
|
@ -127,7 +127,7 @@ void setup() {
|
|||
printActiveIRProtocols(&Serial);
|
||||
Serial.println(F("at pin " STR(IR_RECEIVE_PIN)));
|
||||
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.print(F("Ready to send IR signals at pin " STR(IR_SEND_PIN) " on press of button at pin "));
|
||||
Serial.println(SEND_BUTTON_PIN);
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void setup() {
|
|||
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
|
||||
Serial.println(F("Ready to receive pulse distance/width coded IR signals at pin " STR(IR_RECEIVE_PIN)));
|
||||
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.print(F("Ready to send IR signals at pin " STR(IR_SEND_PIN) " on press of button at pin "));
|
||||
Serial.println(SEND_BUTTON_PIN);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void setup() {
|
|||
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
|
||||
|
||||
Serial.print(F("Ready to receive Hob2Hood IR signals at pin " STR(IR_RECEIVE_PIN)));
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.println(F("Send Hob2Hood IR signals at pin " STR(IR_SEND_PIN)));
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void setup() {
|
|||
Serial.println();
|
||||
Serial.println(F("Because of the verbose output (>200 ms at 115200 baud), repeats are not dumped correctly!"));
|
||||
Serial.println();
|
||||
Serial.println(F("If you receive protocol NEC, Samsung or LG, run also ReceiveDemo to check if your actual protocol is eventually NEC2, SamsungLG or LG2, which is determined by the repeats"));
|
||||
Serial.println(F("If you receive protocol NEC, Samsung or LG, run also ReceiveDemo to check if your actual protocol is eventually NEC2 or SamsungLG, which is determined by the repeats"));
|
||||
Serial.println();
|
||||
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ void setup() {
|
|||
printActiveIRProtocols(&Serial);
|
||||
Serial.println(F("at pin " STR(IR_RECEIVE_PIN)));
|
||||
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.println(F("Ready to send IR signals at pin " STR(IR_SEND_PIN)));
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void setup() {
|
|||
Serial.print(F("Ready to receive IR signals of protocols: "));
|
||||
printActiveIRProtocols(&Serial);
|
||||
Serial.println(F("at pin " STR(IR_RECEIVE_PIN)));
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
|
||||
|
||||
#if FLASHEND >= 0x3FFF // For 16k flash or more, like ATtiny1604
|
||||
|
|
|
@ -111,7 +111,7 @@ void setup() {
|
|||
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
|
||||
|
||||
#if defined(IR_SEND_PIN)
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
|
||||
#else
|
||||
uint8_t tSendPin = 3;
|
||||
|
|
|
@ -58,7 +58,7 @@ void setup() {
|
|||
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
|
||||
|
||||
#if defined(IR_SEND_PIN)
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
# if defined(IR_SEND_PIN_STRING)
|
||||
Serial.println(F("Send IR signals at pin " IR_SEND_PIN_STRING));
|
||||
# else
|
||||
|
|
|
@ -75,7 +75,7 @@ delay(4000); // To be able to connect Serial monitor after reset or power up and
|
|||
/*
|
||||
* The IR library setup. That's all!
|
||||
*/
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
|
||||
|
||||
Serial.println();
|
||||
|
|
|
@ -64,7 +64,7 @@ void setup() {
|
|||
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
|
||||
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
|
||||
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
|
@ -58,7 +58,7 @@ void setup() {
|
|||
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
|
||||
Serial.println(F("Send IR signals at pin " STR(IR_SEND_PIN)));
|
||||
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -36,8 +36,8 @@ void setup() {
|
|||
/*
|
||||
* The IR library setup. That's all!
|
||||
*/
|
||||
// IrSender.begin(); // Start with IR_SEND_PIN as send pin and if NO_LED_FEEDBACK_CODE is NOT defined, enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(DISABLE_LED_FEEDBACK); // Start with IR_SEND_PIN as send pin and disable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
disableLEDFeedback(); // Disable feedback LED at default feedback LED pin
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -138,7 +138,7 @@ void setup() {
|
|||
#endif
|
||||
|
||||
#if defined(IR_SEND_PIN)
|
||||
IrSender.begin(); // Start with IR_SEND_PIN as send pin and enable feedback LED at default feedback LED pin
|
||||
IrSender.begin(); // Start with IR_SEND_PIN -which is defined in PinDefinitionsAndMore.h- as send pin and enable feedback LED at default feedback LED pin
|
||||
# if defined(IR_SEND_PIN_STRING)
|
||||
Serial.println(F("at pin " IR_SEND_PIN_STRING));
|
||||
# else
|
||||
|
|
|
@ -425,11 +425,18 @@ public:
|
|||
*/
|
||||
#if defined(IR_SEND_PIN)
|
||||
void begin();
|
||||
void begin(bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin = USE_DEFAULT_FEEDBACK_LED_PIN);
|
||||
// The default parameter allowed to specify IrSender.begin(7); without errors, if IR_SEND_PIN was defined. But the semantics is not the one the user expect.
|
||||
void begin(bool aEnableLEDFeedback, uint_fast8_t aFeedbackLEDPin); // 4.3.1 Removed default value USE_DEFAULT_FEEDBACK_LED_PIN for last parameter
|
||||
// The next function is a dummy to avoid acceptance of pre 4.3 calls to begin(DISABLE_LED_FEEDBACK);
|
||||
void begin(uint8_t aSendPin)
|
||||
# if !defined (DOXYGEN)
|
||||
__attribute__ ((deprecated ("Error: IR_SEND_PIN is still defined, therefore the function begin(aSendPin) is NOT available. You must disable '#define IR_SEND_PIN' to enable this function.")));
|
||||
# endif
|
||||
|
||||
// The next function is a dummy to avoid acceptance of pre 4.0 calls to begin(IR_SEND_PIN, DISABLE_LED_FEEDBACK);
|
||||
void begin(uint_fast8_t aSendPin, bool aEnableLEDFeedback)
|
||||
# if !defined (DOXYGEN)
|
||||
__attribute__ ((deprecated ("You must use begin(ENABLE_LED_FEEDBACK) or begin(DISABLE_LED_FEEDBACK) since version 4.0.")));
|
||||
__attribute__ ((deprecated ("You must use begin() and enableLEDFeedback() or disableLEDFeedback() since version 4.3.")));
|
||||
# endif
|
||||
#else
|
||||
IRsend(uint_fast8_t aSendPin);
|
||||
|
|
Loading…
Reference in New Issue