IRremote
ir_Dish.cpp
Go to the documentation of this file.
1 #include "IRremote.h"
2 
3 //==============================================================================
4 // DDDD IIIII SSSS H H
5 // D D I S H H
6 // D D I SSS HHHHH
7 // D D I S H H
8 // DDDD IIIII SSSS H H
9 //==============================================================================
10 
11 // Sharp and DISH support by Todd Treece ( http://unionbridge.org/design/ircommand )
12 //
13 // The sned function needs to be repeated 4 times
14 //
15 // Only send the last for characters of the hex.
16 // I.E. Use 0x1C10 instead of 0x0000000000001C10 as listed in the LIRC file.
17 //
18 // Here is the LIRC file I found that seems to match the remote codes from the
19 // oscilloscope:
20 // DISH NETWORK (echostar 301):
21 // http://lirc.sourceforge.net/remotes/echostar/301_501_3100_5100_58xx_59xx
22 
23 #define DISH_BITS 16
24 #define DISH_HDR_MARK 400
25 #define DISH_HDR_SPACE 6100
26 #define DISH_BIT_MARK 400
27 #define DISH_ONE_SPACE 1700
28 #define DISH_ZERO_SPACE 2800
29 #define DISH_RPT_SPACE 6200
30 
31 //+=============================================================================
32 #if SEND_DISH
33 void IRsend::sendDISH(unsigned long data, int nbits) {
34  // Set IR carrier frequency
35  enableIROut(56);
36 
39 
40  for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
41  if (data & mask) {
44  } else {
47  }
48  }
49  mark(DISH_HDR_MARK); //added 26th March 2016, by AnalysIR ( https://www.AnalysIR.com )
50 }
51 #endif
52 
DISH_ZERO_SPACE
#define DISH_ZERO_SPACE
Definition: ir_Dish.cpp:28
IRsend::mark
void mark(unsigned int usec)
Definition: irSend.cpp:69
IRsend::enableIROut
void enableIROut(int khz)
Definition: irSend.cpp:127
DISH_HDR_SPACE
#define DISH_HDR_SPACE
Definition: ir_Dish.cpp:25
IRsend::sendDISH
void sendDISH(unsigned long data, int nbits)
Definition: ir_Dish.cpp:33
IRremote.h
Public API to the library.
IRsend::space
void space(unsigned int usec)
Definition: irSend.cpp:103
DISH_BIT_MARK
#define DISH_BIT_MARK
Definition: ir_Dish.cpp:26
DISH_HDR_MARK
#define DISH_HDR_MARK
Definition: ir_Dish.cpp:24
DISH_ONE_SPACE
#define DISH_ONE_SPACE
Definition: ir_Dish.cpp:27