@@ -81,10 +81,12 @@ uint16_t stat_batt_power = 0; //power going in/out of battery
8181#define GREEN 0
8282#define YELLOW 1
8383#define RED 2
84+ #define BLUE 3
85+
8486Adafruit_NeoPixel pixels (1 , WS2812_PIN, NEO_GRB + NEO_KHZ800);
8587static uint8_t brightness = 0 ;
8688static bool rampUp = true ;
87- const uint8_t maxBrightness = 255 ;
89+ const uint8_t maxBrightness = 100 ;
8890uint8_t LEDcolor = GREEN;
8991
9092// Contactor parameters
@@ -161,8 +163,6 @@ void setup()
161163
162164 // Init LED control
163165 pixels.begin ();
164- pixels.setPixelColor (0 , pixels.Color (0 , 0 , 255 )); // Blue LED full brightness while battery and CAN is starting.
165- pixels.show (); // Incase of crash due to CAN polarity / termination, LED will remain BLUE
166166
167167 // Inverter Setup
168168 #ifdef SOLAX_CAN
@@ -508,8 +508,11 @@ void handle_LED_state()
508508 case YELLOW:
509509 pixels.setPixelColor (0 , pixels.Color (brightness, brightness, 0 )); // Yellow pulsing LED
510510 break ;
511+ case BLUE:
512+ pixels.setPixelColor (0 , pixels.Color (0 , 0 , brightness)); // Blue pulsing LED
513+ break ;
511514 case RED:
512- pixels.setPixelColor (0 , pixels.Color (255 , 0 , 0 )); // Red LED full brightness
515+ pixels.setPixelColor (0 , pixels.Color (150 , 0 , 0 )); // Red LED full brightness
513516 break ;
514517 default :
515518 break ;
0 commit comments