mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-10 02:07:03 +01:00
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
40 lines
492 B
C++
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,
|
|
};
|