MCPcopy Create free account
hub / github.com/FastLED/FastLED / getButtonName

Function getButtonName

src/fl/sensors/pir.cpp.hpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace {
16int g_counter = 0;
17string getButtonName(const char *button_name) {
18 if (button_name) {
19 return string(button_name);
20 }
21 int count = g_counter++;
22 if (count == 0) {
23 return string("PIR");
24 }
25 sstream s;
26 s << "PirLowLevel " << g_counter++;
27 return s.str();
28}
29} // namespace
30
31PirLowLevel::PirLowLevel(int pin): mPin(pin) {

Callers 1

PirMethod · 0.85

Calls 2

stringClass · 0.50
strMethod · 0.45

Tested by

no test coverage detected