Skip to content

Commit eb6f094

Browse files
committed
Version 3.0.0
1 parent 75ccc48 commit eb6f094

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

examples/IRDispatcherDemo/IRCommandDispatcher.cpp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ uint8_t IRCommandDispatcher::checkAndCallCommand() {
167167
return IR_CODE_EMPTY;
168168
}
169169

170-
for (uint8_t i = 0; i < sizeof(IRMapping) / sizeof(struct IRToCommandMappingStruct); ++i) {
170+
for (uint_fast8_t i = 0; i < sizeof(IRMapping) / sizeof(struct IRToCommandMappingStruct); ++i) {
171171
if (IRReceivedData.command == IRMapping[i].IRCode) {
172172

173173
#ifdef INFO
@@ -290,7 +290,7 @@ bool IRCommandDispatcher::delayAndCheckForIRCommand(uint16_t aDelayMillis) {
290290
void IRCommandDispatcher::printIRCommandString() {
291291
#ifdef INFO
292292
Serial.print(F("IRCommand="));
293-
for (uint8_t i = 0; i < sizeof(IRMapping) / sizeof(struct IRToCommandMappingStruct); ++i) {
293+
for (uint_fast8_t i = 0; i < sizeof(IRMapping) / sizeof(struct IRToCommandMappingStruct); ++i) {
294294
if (IRReceivedData.command == IRMapping[i].IRCode) {
295295
Serial.println(reinterpret_cast<const __FlashStringHelper*>(IRMapping[i].CommandString));
296296
return;

examples/IRreceiveDemo/IRreceiveDemo.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
//#define EXCLUDE_EXOTIC_PROTOCOLS // saves around 670 bytes program space if all protocols are active
2020

21-
#define MARK_EXCESS_MICROS 20 // recommended for the cheap VS1838 modules
21+
// MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding,
22+
// to compensate for the signal forming of different IR receiver modules.
23+
#define MARK_EXCESS_MICROS 20 // 20 is recommended for the cheap VS1838 modules
2224

2325
#include <IRremote.h>
2426

examples/IRsendDemo/IRsendDemo.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,16 @@ void loop() {
9898
* 0xCB340102 byte reverse -> 0x020134CB bit reverse-> 40802CD3
9999
*
100100
*/
101-
Serial.println(F("NEC with 16 bit address 0x0102 and command 0x34 with old 32 bit format MSB first"));
101+
Serial.println(F("Send NEC with 16 bit address 0x0102 and command 0x34 with old 32 bit format MSB first"));
102102
IrSender.sendNECMSB(0x40802CD3, 32, false);
103103
delay(2000);
104104
}
105105

106+
107+
Serial.println(F("Send Apple"));
108+
IrSender.sendApple(sAddress, sCommand, sRepeats);
109+
delay(2000);
110+
106111
Serial.println(F("Send Panasonic"));
107112
IrSender.sendPanasonic(sAddress, sCommand, sRepeats);
108113
delay(2000);

examples/MinimalReceiver/MinimalReceiver.ino

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
#else
5656
#define IR_INPUT_PIN 2
57-
//#define DO_NOT_USE_FEEDBACK_LED_PIN
57+
//#define DO_NOT_USE_FEEDBACK_LED // activating saves 12 bytes
5858
#endif
5959

6060
/*
@@ -70,8 +70,6 @@
7070

7171
void setup()
7272
{
73-
pinMode(LED_BUILTIN, OUTPUT);
74-
7573
Serial.begin(115200);
7674
#if defined(__AVR_ATmega32U4__) || defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL) || defined(ARDUINO_attiny3217)
7775
delay(2000); // To be able to connect Serial monitor after reset or power up and before first printout
@@ -80,9 +78,9 @@ void setup()
8078
#if defined(ESP8266)
8179
Serial.println();
8280
#endif
83-
Serial.println(F("START " __FILE__ " from " __DATE__));
81+
// Serial.println(F("START " __FILE__ " from " __DATE__));
8482
initPCIInterruptForTinyReceiver();
85-
Serial.println(F("Ready to receive NEC IR signals at pin " STR(IR_INPUT_PIN)));
83+
// Serial.println(F("Ready to receive NEC IR signals at pin " STR(IR_INPUT_PIN)));
8684
}
8785

8886
void loop()
@@ -110,6 +108,7 @@ void handleReceivedTinyIRData(uint16_t aAddress, uint8_t aCommand, bool isRepeat
110108
Serial.print(aAddress, HEX);
111109
Serial.print(F(" C=0x"));
112110
Serial.print(aCommand, HEX);
113-
Serial.print(F(" R="));
114-
Serial.println(isRepeat);
111+
// Serial.print(F(" R="));
112+
// Serial.print(isRepeat);
113+
Serial.println();
115114
}

0 commit comments

Comments
 (0)