Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented IR rawSend in IRsend class #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions utility/IRLibCPE.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "IRLib_P10_DirecTV.h"
#include "IRLib_P11_RCMM.h"
#include "IRLib_P12_CYKM.h"
#include "IRLib_HashRaw.h"
//include additional protocols here
#include "IRLibCombo.h"
#include "IRLibRecvPCI.h"
Expand Down
15 changes: 15 additions & 0 deletions utility/IRLibCombo.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#ifndef IRLIB_HASHRAW_H
#define IR_SEND_RAW
#define IR_SEND_RAW_ALIGNED
#define IR_DECODE_HASH
#define PV_IR_DECODE_HASH
#define PV_IR_SEND_RAW
Expand Down Expand Up @@ -245,6 +246,20 @@ class IRsend:
IR_SEND_RAW //Must be last one.
}
}

/*
* Sends raw IR data.
* The first parameter to the method is a pointer to the first element of an array of uint16_t values.
* These values are the raw timing values in microseconds.
* The second parameter is the length of the array presented as the first parameter.
* If the frequency to be used in transmission is not specified, it defaults to 38kHz.
*/
#ifdef IRLIB_HASHRAW_H
void sendRaw(uint16_t *buf, uint8_t len, uint8_t khz) {
if(khz==0)khz=38;
IR_SEND_RAW_ALIGNED
}
#endif //IRLIB_HASHRAW_H
};
#endif //IRLIBSENDBASE_H

Expand Down
1 change: 1 addition & 0 deletions utility/IRLib_HashRaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifndef IRLIB_HASHRAW_H
#define IRLIB_HASHRAW_H
#define IR_SEND_RAW case 0: IRsendRaw::send((uint16_t*)data,data2,khz); break;
#define IR_SEND_RAW_ALIGNED IRsendRaw::send(buf,len,khz);
#define IR_DECODE_HASH if(IRdecodeHash::decode()) return true;
#ifdef IRLIB_HAVE_COMBO
#define PV_IR_DECODE_HASH ,public virtual IRdecodeHash
Expand Down