From 2c02e27197fe848ea0e701f9ba560c0b6ffc61ac Mon Sep 17 00:00:00 2001 From: Joeboyc2 Date: Wed, 23 Sep 2020 16:49:55 +0100 Subject: [PATCH] Add the ability to override R,G,B,WPIN values Enable the ability to use the -D option in the platform_override.ini to set the pin numbers outside of the file --- wled00/NpbWrapper.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/wled00/NpbWrapper.h b/wled00/NpbWrapper.h index dbb867b6..d867ef86 100644 --- a/wled00/NpbWrapper.h +++ b/wled00/NpbWrapper.h @@ -88,11 +88,20 @@ #define W2PIN 5 //W2 pin for analog LED strip #undef IR_PIN #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 - #define RPIN 5 //R pin for analog LED strip - #define GPIN 12 //G pin for analog LED strip - #define BPIN 15 //B pin for analog LED strip - #define WPIN 13 //W pin for analog LED strip + #ifndef RPIN + #define RPIN 5 //R pin for analog LED strip + #endif + #ifndef GPIN + #define GPIN 12 //G pin for analog LED strip + #endif + #ifndef BPIN + #define BPIN 15 //B pin for analog LED strip + #endif + #ifndef WPIN + #define WPIN 13 //W pin for analog LED strip + #endif #endif #undef RLYPIN #define RLYPIN -1 //disable as pin 12 is used by analog LEDs