Skip to content

Commit c131dcc

Browse files
committed
2. phase renamed *.cpp.h to .hpp
1 parent 597d7b5 commit c131dcc

File tree

18 files changed

+242
-228
lines changed

18 files changed

+242
-228
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ Click on the LibraryManager badge above to see the [instructions](https://www.ar
1818

1919
# Supported IR Protocols
2020
Denon / Sharp, JVC, LG, NEC / Onkyo / Apple, Panasonic / Kaseikyo, RC5, RC6, Samsung, Sony, (Pronto), BoseWave, Lego, Whynter, MagiQuest.<br/>
21-
Protocols can be switched off and on by defining macros before the line `#include <IRremote.h>` like [here](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/SimpleReceiver/SimpleReceiver.ino#L14):
21+
Protocols can be switched off and on by defining macros before the line `#include <IRremote.hpp>` like [here](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/examples/SimpleReceiver/SimpleReceiver.ino#L14):
2222

2323
```
2424
#define DECODE_NEC
2525
//#define DECODE_DENON
26-
#include <IRremote.h>
26+
#include <IRremote.hpp>
2727
```
2828

2929
# [Wiki](https://github.com/Arduino-IRremote/Arduino-IRremote/wiki)
@@ -136,7 +136,7 @@ If you see something like `Protocol=UNKNOWN Hash=0x13BD886C 35 bits received` as
136136
- If you have an **odd number of bits** received, it is likely, that your receiver circuit has problems. Maybe because the IR signal is too weak.
137137
- If you see timings like `+ 600,- 600 + 550,- 150 + 200,- 100 + 750,- 550` then one 450 µs space was split into two 150 and 100 µs spaces with a spike / error signal of 200 µs between. Maybe because of a defective receiver or a weak signal in conjunction with another light emitting source nearby.
138138
- If you see timings like `+ 500,- 550 + 450,- 550 + 500,- 500 + 500,-1550`, then marks are generally shorter than spaces and therefore `MARK_EXCESS_MICROS` (specified in your ino file) should be **negative** to compensate for this at decoding.
139-
- If you see `Protocol=UNKNOWN Hash=0x0 1 bits received` it may be that the space after the initial mark is longer than [`RECORD_GAP_MICROS`](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/IRremote.h#L124). This was observed for some LG air conditioner protocols. Try again with a line e.g. `#define RECORD_GAP_MICROS 12000` before the line `#include <IRremote.h>` in your ino file.
139+
- If you see `Protocol=UNKNOWN Hash=0x0 1 bits received` it may be that the space after the initial mark is longer than [`RECORD_GAP_MICROS`](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/IRremote.h#L124). This was observed for some LG air conditioner protocols. Try again with a line e.g. `#define RECORD_GAP_MICROS 12000` before the line `#include <IRremote.hpp>` in your ino file.
140140
- To see more info supporting you to find the reason for your UNKNOWN protocol, you must enable the line `//#define DEBUG` in IRremoteInt.h.
141141

142142
## How to deal with protocols not supported by IRremote
@@ -159,7 +159,7 @@ If you do not know which protocol your IR transmitter uses, you have several cho
159159
- The default software generated PWM has **problems on AVR running with 8 MHz**. The PWM frequency is around 30 instead of 38 kHz and RC6 is not reliable. You can switch to timer PWM generation by `#define SEND_PWM_BY_TIMER`.
160160

161161
# Requiring IRremote.h in multiple files / avoiding "multiple definition" error
162-
Use #include <IRremote.h> only in the .ino file (the file containing main()) and use #include <IRremoteInt.h> in all other files.
162+
Use #include <IRremote.hpp> only in the .ino file (the file containing main()) and use #include <IRremoteInt.h> in all other files.
163163

164164
# Examples
165165
In order to fit the examples to the 8K flash of ATtiny85 and ATtiny88, the [Arduino library ATtinySerialOut](https://github.com/ArminJo/ATtinySerialOut) is required for this CPU's.
@@ -216,17 +216,17 @@ Or define the macro with the -D compiler option for global compile (the latter i
216216

217217
| Name | File | Default value | Description |
218218
|-|-|-|-|
219-
| `SEND_PWM_BY_TIMER` | Before `#include <IRremote.h>` | disabled | Disable carrier PWM generation in software and use (restricted) hardware PWM except for ESP32 where both modes are using the flexible `hw_timer_t`. |
220-
| `USE_NO_SEND_PWM` | Before `#include <IRremote.h>` | disabled | Use no carrier PWM, just simulate an **active low** receiver signal. Overrides `SEND_PWM_BY_TIMER` definition. |
221-
| `USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN` | Before `#include <IRremote.h>` | disabled | Use or simulate open drain output mode at send pin. **Attention, active state of open drain is LOW**, so connect the send LED between positive supply and send pin! |
219+
| `SEND_PWM_BY_TIMER` | Before `#include <IRremote.hpp>` | disabled | Disable carrier PWM generation in software and use (restricted) hardware PWM except for ESP32 where both modes are using the flexible `hw_timer_t`. |
220+
| `USE_NO_SEND_PWM` | Before `#include <IRremote.hpp>` | disabled | Use no carrier PWM, just simulate an **active low** receiver signal. Overrides `SEND_PWM_BY_TIMER` definition. |
221+
| `USE_OPEN_DRAIN_OUTPUT_FOR_SEND_PIN` | Before `#include <IRremote.hpp>` | disabled | Use or simulate open drain output mode at send pin. **Attention, active state of open drain is LOW**, so connect the send LED between positive supply and send pin! |
222222
| `NO_LEGACY_COMPATIBILITY` | IRremoteInt.h | disabled | Disables the old decoder for version 2.x compatibility, where all protocols -especially NEC, Panasonic, Sony, Samsung and JVC- were MSB first. Saves around 60 bytes program space and 14 bytes RAM. |
223-
| `EXCLUDE_EXOTIC_PROTOCOLS` | Before `#include <IRremote.h>` | disabled | If activated, BOSEWAVE, MAGIQUEST,WHYNTER and LEGO_PF are excluded in `decode()` and in sending with `IrSender.write()`. Saves up to 650 bytes program space. |
224-
| `EXCLUDE_UNIVERSAL_PROTOCOLS` | Before `#include <IRremote.h>` | disabled | If activated, the universal decoder for pulse width or pulse distance protocols and decodeHash (special decoder for all protocols) are excluded in `decode()`. Saves up to 1000 bytes program space. |
225-
| `MARK_EXCESS_MICROS` | Before `#include <IRremote.h>` | 20 | MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding, to compensate for the signal forming of different IR receiver modules. |
226-
| `RECORD_GAP_MICROS` | Before `#include <IRremote.h>` | 5000 | Minimum gap between IR transmissions, to detect the end of a protocol.<br/>Must be greater than any space of a protocol e.g. the NEC header space of 4500 us.<br/>Must be smaller than any gap between a command and a repeat; e.g. the retransmission gap for Sony is around 24 ms.<br/>Keep in mind, that this is the delay between the end of the received command and the start of decoding. |
227-
| `FEEDBACK_LED_IS_ACTIVE_LOW` | Before `#include <IRremote.h>` | disabled | Required on some boards (like my BluePill and my ESP8266 board), where the feedback LED is active low. |
228-
| `DISABLE_LED_FEEDBACK_FOR_RECEIVE` | Before `#include <IRremote.h>` | disabled | This completely disables the LED feedback code for receive, thus saving around 108 bytes program space and halving the receiver ISR processing time. |
229-
| `IR_INPUT_IS_ACTIVE_HIGH` | Before `#include <IRremote.h>` | disabled | Enable it if you use a RF receiver, which has an active HIGH output signal. |
223+
| `EXCLUDE_EXOTIC_PROTOCOLS` | Before `#include <IRremote.hpp>` | disabled | If activated, BOSEWAVE, MAGIQUEST,WHYNTER and LEGO_PF are excluded in `decode()` and in sending with `IrSender.write()`. Saves up to 650 bytes program space. |
224+
| `EXCLUDE_UNIVERSAL_PROTOCOLS` | Before `#include <IRremote.hpp>` | disabled | If activated, the universal decoder for pulse width or pulse distance protocols and decodeHash (special decoder for all protocols) are excluded in `decode()`. Saves up to 1000 bytes program space. |
225+
| `MARK_EXCESS_MICROS` | Before `#include <IRremote.hpp>` | 20 | MARK_EXCESS_MICROS is subtracted from all marks and added to all spaces before decoding, to compensate for the signal forming of different IR receiver modules. |
226+
| `RECORD_GAP_MICROS` | Before `#include <IRremote.hpp>` | 5000 | Minimum gap between IR transmissions, to detect the end of a protocol.<br/>Must be greater than any space of a protocol e.g. the NEC header space of 4500 us.<br/>Must be smaller than any gap between a command and a repeat; e.g. the retransmission gap for Sony is around 24 ms.<br/>Keep in mind, that this is the delay between the end of the received command and the start of decoding. |
227+
| `FEEDBACK_LED_IS_ACTIVE_LOW` | Before `#include <IRremote.hpp>` | disabled | Required on some boards (like my BluePill and my ESP8266 board), where the feedback LED is active low. |
228+
| `DISABLE_LED_FEEDBACK_FOR_RECEIVE` | Before `#include <IRremote.hpp>` | disabled | This completely disables the LED feedback code for receive, thus saving around 108 bytes program space and halving the receiver ISR processing time. |
229+
| `IR_INPUT_IS_ACTIVE_HIGH` | Before `#include <IRremote.hpp>` | disabled | Enable it if you use a RF receiver, which has an active HIGH output signal. |
230230
| `RAW_BUFFER_LENGTH` | IRremoteInt.h | 101 | Buffer size of raw input buffer. Must be odd! |
231231
| `DEBUG` | IRremoteInt.h | disabled | Enables lots of lovely debug output. |
232232
| `IR_SEND_DUTY_CYCLE` | IRremoteInt.h | 30 | Duty cycle of IR send signal. |

examples/ControlRelay/ControlRelay.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*/
4343
#include "PinDefinitionsAndMore.h"
4444

45-
#include <IRremote.h>
45+
#include <IRremote.hpp>
4646

4747
#if defined(APPLICATION_PIN)
4848
#define RELAY_PIN APPLICATION_PIN

examples/IRremoteExtensionTest/IRremoteExtensionTest.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "PinDefinitionsAndMore.h"
77

8-
#include <IRremote.h>
8+
#include <IRremote.hpp>
99

1010
#include "IRremoteExtensionClass.h"
1111

examples/IRremoteInfo/IRremoteInfo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Original Author: AnalysIR - IR software & modules for Makers & Pros, visit http://www.AnalysIR.com
1111
*/
1212

13-
#include <IRremote.h>
13+
#include <IRremote.hpp>
1414

1515
// Function declarations for non Arduino IDE's
1616
void dumpHeader();

examples/ReceiveAndSend/ReceiveAndSend.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
//#define EXCLUDE_EXOTIC_PROTOCOLS // saves around 900 bytes program space
5353

54-
#include <IRremote.h>
54+
#include <IRremote.hpp>
5555

5656
int SEND_BUTTON_PIN = APPLICATION_PIN;
5757
int STATUS_PIN = LED_BUILTIN;

examples/ReceiveDemo/ReceiveDemo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/*
3737
* Specify which protocol(s) should be used for decoding.
3838
* If no protocol is defined, all protocols are active.
39-
* This must be done before the #include <IRremote.h>
39+
* This must be done before the #include <IRremote.hpp>
4040
*/
4141
//#define DECODE_LG
4242
//#define DECODE_NEC
@@ -65,7 +65,7 @@
6565
*/
6666
#include "PinDefinitionsAndMore.h"
6767

68-
#include <IRremote.h>
68+
#include <IRremote.hpp>
6969

7070
#if defined(APPLICATION_PIN)
7171
#define DEBUG_BUTTON_PIN APPLICATION_PIN // if low, print timing for each received data set

examples/ReceiveDump/ReceiveDump.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#define MARK_EXCESS_MICROS 20 // recommended for the cheap VS1838 modules
4747

4848
//#define RECORD_GAP_MICROS 12000 // Activate it for some LG air conditioner protocols
49-
#include <IRremote.h>
49+
#include <IRremote.hpp>
5050

5151
//+=============================================================================
5252
// Configure the Arduino

examples/SendAndReceive/SendAndReceive.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
//#define SEND_PWM_BY_TIMER
5151
//#define USE_NO_SEND_PWM
5252

53-
#include <IRremote.h>
53+
#include <IRremote.hpp>
5454

5555
#define DELAY_AFTER_SEND 2000
5656
#define DELAY_AFTER_LOOP 5000

examples/SendBoseWaveDemo/SendBoseWaveDemo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
#include "PinDefinitionsAndMore.h"
4040

41-
#include <IRremote.h>
41+
#include <IRremote.hpp>
4242

4343
//......................................................................
4444
//

examples/SendDemo/SendDemo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
//#define SEND_PWM_BY_TIMER
4242
//#define USE_NO_SEND_PWM
4343

44-
#include <IRremote.h>
44+
#include <IRremote.hpp>
4545

4646
#define DELAY_AFTER_SEND 2000
4747
#define DELAY_AFTER_LOOP 5000

0 commit comments

Comments
 (0)