From 8e23cf3159dd096d5fe2ab9d8372a875f02273ce Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 24 Mar 2021 10:22:16 +0000 Subject: [PATCH] Cleanup of function names and defines --- include/config_example.h | 2 +- src/busylight.cpp | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/include/config_example.h b/include/config_example.h index d27865f..e0e66b3 100644 --- a/include/config_example.h +++ b/include/config_example.h @@ -16,7 +16,7 @@ #define WIFI_PASS "s3cur3" // Enables the webserver -#define WEBSERVER +#define ENABLE_WEBSERVER // Enable MQTT connection (not complete) //#define ENABLE_MQTT diff --git a/src/busylight.cpp b/src/busylight.cpp index 8d85afd..184c793 100644 --- a/src/busylight.cpp +++ b/src/busylight.cpp @@ -42,7 +42,7 @@ int RGB_calc(int value) { } // Writes out the RBG colours to the pins -void RGB_color(int r, int g, int b) +void setRGBColor(int r, int g, int b) { analogWrite(RED_LED_PIN, RGB_calc(r)); analogWrite(GREEN_LED_PIN, RGB_calc(g)); @@ -50,30 +50,30 @@ void RGB_color(int r, int g, int b) } // Switches status based on a status struct provided -void Switch_Status(struct status status) { +void switchStatus(struct status status) { if (status.blink > 0) { bool bstate = false; for(int j=0; j