Version fonctionnelle 1.0
This commit is contained in:
@@ -14,24 +14,24 @@
|
||||
#define LED_INDICATOR_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <FastLED.h>
|
||||
// #include <FastLED.h>
|
||||
|
||||
// Pin definition for WS2812 LEDs
|
||||
#define LED_DATA_PIN 4 ///< Data pin for WS2812 strip
|
||||
#define NUM_LEDS 2 ///< Number of LEDs (Power + Mode)
|
||||
#define NUM_LEDS 4 ///< Number of LEDs (Power + Mode)
|
||||
|
||||
// LED indices
|
||||
// // LED indices
|
||||
#define LED_POWER 0 ///< Power status indicator
|
||||
#define LED_MODE 1 ///< Mode indicator (DCC/Analog)
|
||||
|
||||
/**
|
||||
* @class LEDIndicator
|
||||
* @brief Manages WS2812 RGB LED status displays
|
||||
*
|
||||
* Controls two LEDs for system status indication:
|
||||
* - Power LED: Shows system power state with boot animation
|
||||
* - Mode LED: Shows control mode with pulsing effect
|
||||
*/
|
||||
// /**
|
||||
// * @class LEDIndicator
|
||||
// * @brief Manages WS2812 RGB LED status displays
|
||||
// *
|
||||
// * Controls two LEDs for system status indication:
|
||||
// * - Power LED: Shows system power state with boot animation
|
||||
// * - Mode LED: Shows control mode with pulsing effect
|
||||
// */
|
||||
class LEDIndicator {
|
||||
public:
|
||||
/**
|
||||
@@ -86,20 +86,20 @@ public:
|
||||
*/
|
||||
void modeChangeEffect();
|
||||
|
||||
private:
|
||||
CRGB leds[NUM_LEDS]; ///< LED array
|
||||
bool powerOn; ///< Power status flag
|
||||
bool dccMode; ///< Mode flag (DCC/Analog)
|
||||
uint8_t brightness; ///< Current brightness level
|
||||
unsigned long lastUpdate; ///< Last update timestamp
|
||||
uint8_t pulsePhase; ///< Pulse animation phase
|
||||
// private:
|
||||
// CRGB leds[NUM_LEDS]; ///< LED array
|
||||
// bool powerOn; ///< Power status flag
|
||||
// bool dccMode; ///< Mode flag (DCC/Analog)
|
||||
// uint8_t brightness; ///< Current brightness level
|
||||
// unsigned long lastUpdate; ///< Last update timestamp
|
||||
// uint8_t pulsePhase; ///< Pulse animation phase
|
||||
|
||||
// LED color definitions
|
||||
static constexpr CRGB COLOR_POWER_ON = CRGB::Green; ///< Power ON color
|
||||
static constexpr CRGB COLOR_POWER_OFF = CRGB::Red; ///< Power OFF color
|
||||
static constexpr CRGB COLOR_DCC = CRGB::Blue; ///< DCC mode color
|
||||
static constexpr CRGB COLOR_ANALOG = CRGB::Yellow; ///< Analog mode color
|
||||
static constexpr CRGB COLOR_OFF = CRGB::Black; ///< LED off state
|
||||
// // LED color definitions
|
||||
// static constexpr CRGB COLOR_POWER_ON = CRGB::Green; ///< Power ON color
|
||||
// static constexpr CRGB COLOR_POWER_OFF = CRGB::Red; ///< Power OFF color
|
||||
// static constexpr CRGB COLOR_DCC = CRGB::Blue; ///< DCC mode color
|
||||
// static constexpr CRGB COLOR_ANALOG = CRGB::Yellow; ///< Analog mode color
|
||||
// static constexpr CRGB COLOR_OFF = CRGB::Black; ///< LED off state
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user