Skip to content

Commit c01dd23

Browse files
authored
FIX IR_PIN to IRPIN (#1394)
...in cfg.cpp the if statement used "IRPIN" (which is consistent to all other PIN names), but on the declaration-side "IR_PIN" was used. Changed all occurences of "IR_PIN" to "IRPIN".
1 parent 825cc09 commit c01dd23

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

platformio_override.ini.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build_flags = ${common.build_flags_esp8266}
2929
; -D LEDPIN=2
3030
; -D BTNPIN=0
3131
; -D TOUCHPIN=T0
32-
; -D IR_PIN=4
32+
; -D IRPIN=4
3333
; -D RLYPIN=12
3434
; -D RLYMDE=1
3535
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support

usermods/TTGO-T-Display/platformio_override.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ build_flags = ${common.build_flags_esp32}
33
; PIN defines - uncomment and change, if needed:
44
; -D LEDPIN=2
55
-D BTNPIN=35
6-
; -D IR_PIN=4
6+
; -D IRPIN=4
77
; -D RLYPIN=12
88
; -D RLYMDE=1

usermods/esp32_multistrip/NpbWrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#define LEDPIN 1 // Legacy pin def required by some other portions of code. This pin is not used do drive LEDs.
2525
#endif
2626

27-
#ifndef IR_PIN
28-
#define IR_PIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
27+
#ifndef IRPIN
28+
#define IRPIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
2929
#endif
3030

3131
#ifndef RLYPIN

wled00/NpbWrapper.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
//#define TOUCHPIN T0 //touch pin. Behaves the same as button. ESP32 only.
2626
#endif
2727

28-
#ifndef IR_PIN
29-
#define IR_PIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
28+
#ifndef IRPIN
29+
#define IRPIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
3030
#endif
3131

3232
#ifndef RLYPIN
@@ -71,8 +71,8 @@
7171
#define WPIN 14 //W pin for analog LED strip
7272
#define W2PIN 04 //W2 pin for analog LED strip
7373
#undef BTNPIN
74-
#undef IR_PIN
75-
#define IR_PIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
74+
#undef IRPIN
75+
#define IRPIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
7676
#elif defined(WLED_USE_BWLT11)
7777
//PWM pins - to use with BW-LT11
7878
#define RPIN 12 //R pin for analog LED strip
@@ -93,7 +93,7 @@
9393
#define BPIN 14 //B pin for analog LED strip
9494
#define WPIN 4 //W pin for analog LED strip
9595
#define W2PIN 5 //W2 pin for analog LED strip
96-
#undef IR_PIN
96+
#undef IRPIN
9797
#else
9898
//Enable override of Pins by using the platformio_override.ini file
9999
//PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller

wled00/cfg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ void serializeConfig() {
434434

435435
#if defined(IRPIN) && IRPIN > -1
436436
JsonObject hw_ir = hw.createNestedObject("ir");
437-
hw_ir[F("pin")] = IR_PIN;
437+
hw_ir[F("pin")] = IRPIN;
438438
hw_ir[F("type")] = 0;
439439
#endif
440440

wled00/ir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ void initIR()
488488
{
489489
if (irEnabled > 0)
490490
{
491-
irrecv = new IRrecv(IR_PIN);
491+
irrecv = new IRrecv(IRPIN);
492492
irrecv->enableIRIn();
493493
}
494494
}

wled00/wled.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
Comment out this error message to build regardless.
130130
#endif
131131

132-
#if IR_PIN < 0
132+
#if IRPIN < 0
133133
#ifndef WLED_DISABLE_INFRARED
134134
#define WLED_DISABLE_INFRARED
135135
#endif

0 commit comments

Comments
 (0)