mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-21 04:32:09 +02:00
Merge pull request #196 from airgradienthq/hotfix/led-bar-show-sensor-data-incorrect
Correct LED bar show sensor value level color
This commit is contained in:
@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
#define RGB_COLOR_R 255, 0, 0 /** Red */
|
#define RGB_COLOR_R 255, 0, 0 /** Red */
|
||||||
#define RGB_COLOR_G 0, 255, 0 /** Green */
|
#define RGB_COLOR_G 0, 255, 0 /** Green */
|
||||||
#define RGB_COLOR_Y 255, 255, 0 /** Yellow */
|
#define RGB_COLOR_Y 255, 150, 0 /** Yellow */
|
||||||
#define RGB_COLOR_O 255, 165, 0 /** Organge */
|
#define RGB_COLOR_O 255, 40, 0 /** Orange */
|
||||||
#define RGB_COLOR_P 160, 32, 240 /** Purple */
|
#define RGB_COLOR_P 180, 0, 255 /** Purple */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Animation LED bar with color
|
* @brief Animation LED bar with color
|
||||||
@ -573,7 +573,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
|
|||||||
case AgStateMachineWiFiManagerMode: {
|
case AgStateMachineWiFiManagerMode: {
|
||||||
/** In WiFi Manager Mode */
|
/** In WiFi Manager Mode */
|
||||||
/** Turn LED OFF */
|
/** Turn LED OFF */
|
||||||
/** Turn midle LED Color */
|
/** Turn middle LED Color */
|
||||||
if (ag->isOne()) {
|
if (ag->isOne()) {
|
||||||
ag->ledBar.setColor(0, 0, 255, ag->ledBar.getNumberOfLeds() / 2);
|
ag->ledBar.setColor(0, 0, 255, ag->ledBar.getNumberOfLeds() / 2);
|
||||||
} else {
|
} else {
|
||||||
@ -713,7 +713,7 @@ void StateMachine::handleLeds(AgStateMachineState state) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AgStateMachineSensorConfigFailed: {
|
case AgStateMachineSensorConfigFailed: {
|
||||||
/** Server is reachable but there is some configuration issue to be fixed on
|
/** Server is reachable but there is some configuration issue to be fixed on
|
||||||
* the server side */
|
* the server side */
|
||||||
if (ag->isOne()) {
|
if (ag->isOne()) {
|
||||||
ag->ledBar.setColor(139, 24, 248, 0);
|
ag->ledBar.setColor(139, 24, 248, 0);
|
||||||
|
Reference in New Issue
Block a user