6: frequency(frequency_),dutyCycle(dutyCycle_),intro(intro_),repeat(repeat_),ending(ending_) {
11: frequency(frequency_),dutyCycle(dutyCycle_),intro(intro_),repeat(repeat_),ending(ending_) {
16: frequency(frequency_), dutyCycle(dutyCycle_), intro(intro_), repeat(repeat_), ending() {
21: frequency(frequency_), dutyCycle(dutyCycle_), intro(intro_), repeat(repeat_), ending() {
28: frequency(frequency_),
30intro(intro_, introLength),
31repeat(repeat_, repeatLength),
32ending(ending_, endingLength) {
38: frequency(frequency_),
40intro(intro_, introLength),
41repeat(repeat_, repeatLength),
55 frequency_, dutyCycle_);
64 frequency_, dutyCycle_);
75 intro.dump(stream, usingSigns);
76 repeat.dump(stream, usingSigns);
77 ending.dump(stream, usingSigns);
82 stream.print(F(
"f="));
83 stream.print(frequency);
90 if (dutyCycle > 0 && dutyCycle < 100) {
91 stream.print(dutyCycle);
int8_t dutycycle_t
Type for duty cycle in percent.
uint16_t microseconds_t
Type for durations in micro seconds.
uint32_t frequency_t
Type for modulation frequency in Hz.
This class consists of a vector of durations.
static IrSequence * readFlash(const microseconds_t *flashData, size_t length)
Create an IrSequence from data in PROGMEM.
This class models an IR signal with intro-, repeat-, and ending sequences.
void dump(Stream &stream, bool usingSigns=false) const
Print a human readable representation of the IrSignal on the Stream supplied.
static constexpr frequency_t invalidFrequency
bool dumpDutyCycle(Stream &stream) const
If the duty cycle is sensible, print it to the stream and return true.
bool dumpFrequency(Stream &stream) const
If the frequency is sensible, print it to the stream and return true.
IrSignal()
Constructs an empty IrSignal.
static IrSignal * readFlash(const microseconds_t *intro, size_t lengthIntro, const microseconds_t *repeat, size_t lengthRepeat, const microseconds_t *ending, size_t lengthEnding, frequency_t frequency=defaultFrequency, dutycycle_t dutyCycle=defaultDutyCycle)