From 4fb49d8ebcda80cf5c370271c4c426b7c06f2a9a Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 24 Apr 2017 22:44:03 +0100 Subject: [PATCH] Coding style changes --- code/espurna/light.ino | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/espurna/light.ino b/code/espurna/light.ino index 380ad68e..473efe95 100644 --- a/code/espurna/light.ino +++ b/code/espurna/light.ino @@ -138,8 +138,7 @@ void color_temperature2array(unsigned int temperature, unsigned int * array) { // Converts a color intensity value (0..255) to a pwm value // This takes care of positive or negative logic -unsigned int intensity2pwm(unsigned int intensity) -{ +unsigned int _intensity2pwm(unsigned int intensity) { unsigned int pwm; #if ENABLE_GAMMA_CORRECTION @@ -183,11 +182,11 @@ void _lightProviderSet(bool state, unsigned int red, unsigned int green, unsigne // Check state if (!state) red = green = blue = white = 0; - analogWrite(RGBW_RED_PIN, intensity2pwm(red)); - analogWrite(RGBW_GREEN_PIN, intensity2pwm(green)); - analogWrite(RGBW_BLUE_PIN, intensity2pwm(blue)); + analogWrite(RGBW_RED_PIN, _intensity2pwm(red)); + analogWrite(RGBW_GREEN_PIN, _intensity2pwm(green)); + analogWrite(RGBW_BLUE_PIN, _intensity2pwm(blue)); #if (LIGHT_PROVIDER == LIGHT_PROVIDER_RGBW) - analogWrite(RGBW_WHITE_PIN, intensity2pwm(white)); + analogWrite(RGBW_WHITE_PIN, _intensity2pwm(white)); #endif #endif