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".
This commit is contained in:
parent
825cc096c0
commit
c01dd232c5
@ -29,7 +29,7 @@ build_flags = ${common.build_flags_esp8266}
|
|||||||
; -D LEDPIN=2
|
; -D LEDPIN=2
|
||||||
; -D BTNPIN=0
|
; -D BTNPIN=0
|
||||||
; -D TOUCHPIN=T0
|
; -D TOUCHPIN=T0
|
||||||
; -D IR_PIN=4
|
; -D IRPIN=4
|
||||||
; -D RLYPIN=12
|
; -D RLYPIN=12
|
||||||
; -D RLYMDE=1
|
; -D RLYMDE=1
|
||||||
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support
|
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support
|
||||||
|
@ -3,6 +3,6 @@ build_flags = ${common.build_flags_esp32}
|
|||||||
; PIN defines - uncomment and change, if needed:
|
; PIN defines - uncomment and change, if needed:
|
||||||
; -D LEDPIN=2
|
; -D LEDPIN=2
|
||||||
-D BTNPIN=35
|
-D BTNPIN=35
|
||||||
; -D IR_PIN=4
|
; -D IRPIN=4
|
||||||
; -D RLYPIN=12
|
; -D RLYPIN=12
|
||||||
; -D RLYMDE=1
|
; -D RLYMDE=1
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
#define LEDPIN 1 // Legacy pin def required by some other portions of code. This pin is not used do drive LEDs.
|
#define LEDPIN 1 // Legacy pin def required by some other portions of code. This pin is not used do drive LEDs.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IR_PIN
|
#ifndef IRPIN
|
||||||
#define IR_PIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
#define IRPIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RLYPIN
|
#ifndef RLYPIN
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
//#define TOUCHPIN T0 //touch pin. Behaves the same as button. ESP32 only.
|
//#define TOUCHPIN T0 //touch pin. Behaves the same as button. ESP32 only.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IR_PIN
|
#ifndef IRPIN
|
||||||
#define IR_PIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
#define IRPIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RLYPIN
|
#ifndef RLYPIN
|
||||||
@ -71,8 +71,8 @@
|
|||||||
#define WPIN 14 //W pin for analog LED strip
|
#define WPIN 14 //W pin for analog LED strip
|
||||||
#define W2PIN 04 //W2 pin for analog LED strip
|
#define W2PIN 04 //W2 pin for analog LED strip
|
||||||
#undef BTNPIN
|
#undef BTNPIN
|
||||||
#undef IR_PIN
|
#undef IRPIN
|
||||||
#define IR_PIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
#define IRPIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
|
||||||
#elif defined(WLED_USE_BWLT11)
|
#elif defined(WLED_USE_BWLT11)
|
||||||
//PWM pins - to use with BW-LT11
|
//PWM pins - to use with BW-LT11
|
||||||
#define RPIN 12 //R pin for analog LED strip
|
#define RPIN 12 //R pin for analog LED strip
|
||||||
@ -93,7 +93,7 @@
|
|||||||
#define BPIN 14 //B pin for analog LED strip
|
#define BPIN 14 //B pin for analog LED strip
|
||||||
#define WPIN 4 //W pin for analog LED strip
|
#define WPIN 4 //W pin for analog LED strip
|
||||||
#define W2PIN 5 //W2 pin for analog LED strip
|
#define W2PIN 5 //W2 pin for analog LED strip
|
||||||
#undef IR_PIN
|
#undef IRPIN
|
||||||
#else
|
#else
|
||||||
//Enable override of Pins by using the platformio_override.ini file
|
//Enable override of Pins by using the platformio_override.ini file
|
||||||
//PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller
|
//PWM pins - PINs 5,12,13,15 are used with Magic Home LED Controller
|
||||||
|
@ -434,7 +434,7 @@ void serializeConfig() {
|
|||||||
|
|
||||||
#if defined(IRPIN) && IRPIN > -1
|
#if defined(IRPIN) && IRPIN > -1
|
||||||
JsonObject hw_ir = hw.createNestedObject("ir");
|
JsonObject hw_ir = hw.createNestedObject("ir");
|
||||||
hw_ir[F("pin")] = IR_PIN;
|
hw_ir[F("pin")] = IRPIN;
|
||||||
hw_ir[F("type")] = 0;
|
hw_ir[F("type")] = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ void initIR()
|
|||||||
{
|
{
|
||||||
if (irEnabled > 0)
|
if (irEnabled > 0)
|
||||||
{
|
{
|
||||||
irrecv = new IRrecv(IR_PIN);
|
irrecv = new IRrecv(IRPIN);
|
||||||
irrecv->enableIRIn();
|
irrecv->enableIRIn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
Comment out this error message to build regardless.
|
Comment out this error message to build regardless.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IR_PIN < 0
|
#if IRPIN < 0
|
||||||
#ifndef WLED_DISABLE_INFRARED
|
#ifndef WLED_DISABLE_INFRARED
|
||||||
#define WLED_DISABLE_INFRARED
|
#define WLED_DISABLE_INFRARED
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user