Files
espurna/code/espurna/led_internal.h
Maxim Prokhorov bdf87e1a51 led(pattern): refactoring
w/ another -fsanitize=address hint, use separate objects instead of
relying on pattern itself holding everything api *may* need

combine pattern and preset patterns currently separate timers
pattern container reworked to allow small-size optimization

introduce a special '0,0' marker, repeating the whole pattern (instead
of just one delay at the end)

since pattern is part of the led struct proper, display it in settings query
update tests & reuse time parsing routines from utils
2025-11-10 02:53:35 +03:00

40 lines
492 B
C++

/*
Part of the LED MODULE
*/
#pragma once
#include <cstddef>
#include "system_time.h"
namespace espurna {
namespace led {
using Duration = espurna::time::CpuClock::duration;
struct Delay {
Duration on;
Duration off;
size_t repeats;
};
bool operator==(const Delay&, const Delay&);
} // namespace led
} // namespace espurna
enum class LedMode {
Manual,
WiFi,
Relay,
RelayInverse,
FindMe,
FindMeWiFi,
On,
Off,
Relays,
RelaysWiFi,
};