From f8e1623f01c843b7fc6f3ec7d5428b9f191cc492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sat, 25 May 2019 07:44:01 +0200 Subject: [PATCH] Check TERMINAL_SUPPORT for _rpnInitCommands and remove unused variable --- code/espurna/light.ino | 1 - code/espurna/rpnrules.ino | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/espurna/light.ino b/code/espurna/light.ino index f495c876..ba428845 100644 --- a/code/espurna/light.ino +++ b/code/espurna/light.ino @@ -105,7 +105,6 @@ void _setRGBInputValue(unsigned char red, unsigned char green, unsigned char blu void _generateBrightness() { - unsigned char value; double brightness = (double) _light_brightness / LIGHT_MAX_BRIGHTNESS; // Convert RGB to RGBW(W) diff --git a/code/espurna/rpnrules.ino b/code/espurna/rpnrules.ino index 997a4bff..39cab2ac 100644 --- a/code/espurna/rpnrules.ino +++ b/code/espurna/rpnrules.ino @@ -288,7 +288,11 @@ void rpnSetup() { // Load & cache settings _rpnConfigure(); - _rpnInitCommands(); + + // Terminal commands + #if TERMINAL_SUPPORT + _rpnInitCommands(); + #endif // Websockets #if WEB_SUPPORT @@ -307,4 +311,4 @@ void rpnSetup() { } -#endif +#endif // RPN_RULES_SUPPORT