Automatic Curtain  MVP
Software repository for an automatic curtain using stepper motor, TMC2209 and ESP32
indicator.h
Go to the documentation of this file.
1 
13 #ifndef _INDICATOR_INCLUDE_GUARD
14 #define _INDICATOR_INCLUDE_GUARD
15 
16 #include <FastLED.h>
17 
18 #include <memory>
19 
20 #include "../config/config.h"
21 #include "../logging/logging.h"
22 
23 class Indicator {
24  public:
30  Indicator(std::shared_ptr<Logging>& logging);
31 
36  ~Indicator();
37 
47 
48  private:
49  std::shared_ptr<Logging> logger_;
51 
56  void InitializeLED();
57 };
58 
59 #endif
Definition: indicator.h:23
bool UpdateStatus(CONFIG_SET::DEVICE_STATUS status)
Updates the color of LED by using mapping from status to color of LED.
Definition: indicator.cpp:32
CRGB leds_[CONFIG_SET::NUMBER_OF_LEDS]
Definition: indicator.h:50
void InitializeLED()
Initializes RGB LED.
Definition: indicator.cpp:25
~Indicator()
Destroy the Indicator object.
Definition: indicator.cpp:19
Indicator(std::shared_ptr< Logging > &logging)
Fetches the LED pin from config, setups pin mode, setup WS2812 RGBLED, initializes logger...
Definition: indicator.cpp:21
std::shared_ptr< Logging > logger_
Definition: indicator.h:49
DEVICE_STATUS
Definition: config.h:147
const int NUMBER_OF_LEDS
Definition: config.h:37