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".
pull/1395/head
Def3nder 2020-11-29 20:47:13 +01:00 zatwierdzone przez GitHub
rodzic 825cc096c0
commit c01dd232c5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -29,7 +29,7 @@ build_flags = ${common.build_flags_esp8266}
; -D LEDPIN=2
; -D BTNPIN=0
; -D TOUCHPIN=T0
; -D IR_PIN=4
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support

Wyświetl plik

@ -3,6 +3,6 @@ build_flags = ${common.build_flags_esp32}
; PIN defines - uncomment and change, if needed:
; -D LEDPIN=2
-D BTNPIN=35
; -D IR_PIN=4
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1

Wyświetl plik

@ -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.
#endif
#ifndef IR_PIN
#define IR_PIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#ifndef IRPIN
#define IRPIN -1 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#endif
#ifndef RLYPIN

Wyświetl plik

@ -25,8 +25,8 @@
//#define TOUCHPIN T0 //touch pin. Behaves the same as button. ESP32 only.
#endif
#ifndef IR_PIN
#define IR_PIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#ifndef IRPIN
#define IRPIN 4 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#endif
#ifndef RLYPIN
@ -71,8 +71,8 @@
#define WPIN 14 //W pin for analog LED strip
#define W2PIN 04 //W2 pin for analog LED strip
#undef BTNPIN
#undef IR_PIN
#define IR_PIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#undef IRPIN
#define IRPIN 0 //infrared pin (-1 to disable) MagicHome: 4, H801 Wifi: 0
#elif defined(WLED_USE_BWLT11)
//PWM pins - to use with BW-LT11
#define RPIN 12 //R pin for analog LED strip
@ -93,7 +93,7 @@
#define BPIN 14 //B pin for analog LED strip
#define WPIN 4 //W pin for analog LED strip
#define W2PIN 5 //W2 pin for analog LED strip
#undef IR_PIN
#undef IRPIN
#else
//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

Wyświetl plik

@ -434,7 +434,7 @@ void serializeConfig() {
#if defined(IRPIN) && IRPIN > -1
JsonObject hw_ir = hw.createNestedObject("ir");
hw_ir[F("pin")] = IR_PIN;
hw_ir[F("pin")] = IRPIN;
hw_ir[F("type")] = 0;
#endif

Wyświetl plik

@ -488,7 +488,7 @@ void initIR()
{
if (irEnabled > 0)
{
irrecv = new IRrecv(IR_PIN);
irrecv = new IRrecv(IRPIN);
irrecv->enableIRIn();
}
}

Wyświetl plik

@ -129,7 +129,7 @@
Comment out this error message to build regardless.
#endif
#if IR_PIN < 0
#if IRPIN < 0
#ifndef WLED_DISABLE_INFRARED
#define WLED_DISABLE_INFRARED
#endif