SensESP 3.2.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
system_status_led.cpp
Go to the documentation of this file.
1#include "system_status_led.h"
2
3namespace sensesp {
4
5// PATTERN: **__________________
8
9// PATTERN: ******______________
14
15// PATTERN: **************______
20
21// PATTERN: *************_*_*_*_
32
33// PATTERN: ******************__
38
39// PATTERN: *_*_*_*_____________
50
51// PATTERN: ****____
56
61
63 std::vector<LEDPatternFragment> no_ap_frags;
64 no_ap_frags.push_back(frag_linear_fade(100, 100, CRGB::Red));
65 no_ap_frags.push_back(frag_linear_fade(950, 200, CRGB::Black));
66 LEDPattern no_ap_pattern(no_ap_frags);
67
68 blinker_->set_pattern(no_ap_pattern);
69 ESP_LOGD("SystemStatusLed", "pattern set to no_ap");
70}
71
75
88
90 static LambdaConsumer<int> delta_tx_count_consumer_{
91 [this](int) { blinker_->add_modifier(blip_pattern); }};
92 return delta_tx_count_consumer_;
93}
94
95} // namespace sensesp
std::unique_ptr< LEDBlinker > blinker_
ValueConsumer< int > & get_delta_tx_count_consumer()
Provides an easy way of calling a function based on the output of any ValueProducer.
A base class for piece of code (like a transform) that accepts data for input. ValueConsumers can acc...
LEDPattern blip_pattern
LEDPatternFragment frag_linear_fade(uint32_t duration_ms, uint32_t fade_duration_ms, const CRGB &target_color)
LEDPattern no_ap_pattern
LEDPattern ws_authorizing_pattern
LEDPattern ws_disconnected_pattern
LEDPattern ws_connected_pattern
LEDPatternFragment frag_blend(uint32_t duration_ms, const CRGB &target_color, bool reverse)
LEDPattern wifi_connected_pattern
LEDPattern ws_connecting_pattern
LEDPattern wifi_disconnected_pattern
static const CRGB Blue
Definition crgb.h:91
static const CRGB Red
Definition crgb.h:89
static const CRGB Black
Definition crgb.h:88
static const CRGB Yellow
Definition crgb.h:90