Infrared4Arduino
IrSenderNonMod.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2015 Bengt Martensson.
3 
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or (at
7 your option) any later version.
8 
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see http://www.gnu.org/licenses/.
16 */
17 
18 #ifndef IRSENDERNONMOD_H
19 #define IRSENDERNONMOD_H
20 
21 #include <Arduino.h>
22 #include "InfraredTypes.h"
23 #include "IrSender.h"
24 
28 class IrSenderNonMod : public IrSender {
29 public:
30  IrSenderNonMod(pin_t pin);
31 
37  void send(const IrSequence& irSequence, frequency_t frequency = IrSignal::defaultFrequency) {
38  if (frequency == 0U)
39  sendNonModulated(irSequence);
40  }
41 
46  void sendNonModulated(const IrSequence& irSequence);
47 };
48 
49 #endif /* ! IRSENDERNONMOD_H */
50 
static const frequency_t defaultFrequency
Definition: IrSignal.h:13
uint8_t pin_t
Type for GPIO pin, compatible with Arduino libs.
Definition: InfraredTypes.h:40
void send(const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency)
Two parameter form just to be compatible with the super class.
void sendNonModulated(const IrSequence &irSequence)
Sends the IrSequence as argument.
IrSender implementation without modulation.
Abstract base class for all sending classes.
Definition: IrSender.h:27
uint16_t frequency_t
Type for modulation frequency in Hz.
Definition: InfraredTypes.h:33
This class consists of a vector of durations.
Definition: IrSequence.h:12
This file defines some general data types that are used in the library.
IrSenderNonMod(pin_t pin)