You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The definition to pass the frequency from IRLibCombo.h send case statement is using 'khz' parameter. public: void send(uint8_t protocolNum, uint32_t data, uint16_t data2=0, uint8_t khz=38) { if(khz==0)khz=38; switch(protocolNum) { IR_SEND_PROTOCOL_01
However, the IRLib_P01_NEC.h is using 'data2' which is passing the wrong parameter for frequency. #define IR_SEND_PROTOCOL_01 case 1: if(data2==0)data2=38;IRsendNEC::send(data,data2); break;
This should be changed to: #define IR_SEND_PROTOCOL_01 case 1: if(khz==0)khz=38;IRsendNEC::send(data,khz); break;
The text was updated successfully, but these errors were encountered:
hiduino
changed the title
Bug in IRLib_P01_NEC.h not setting the modulation frequency correctly
Problem in IRLib_P01_NEC.h not setting the modulation frequency correctly
Aug 24, 2018
I concur with @hiduino. Until I found this post, I spent two days fighting what I thought was a hardware issue as my television was intermittently receiving codes I sent. My code is using the IRLibCombo send method with 3 paramters, the protocol, code, and number of bits as my device handles multiple protocols at the same time.
With the above bug, when the # of bits is supplied for an NEC code (32) it overrides the frequency to 32 khz instead of 38 khz. The result was that my television had a weak response to codes which sometimes were skipped altogether.
With the corrections above, my device now has complete reliability in transmitting codes.
The definition to pass the frequency from IRLibCombo.h send case statement is using 'khz' parameter.
public:
void send(uint8_t protocolNum, uint32_t data, uint16_t data2=0, uint8_t khz=38) {
if(khz==0)khz=38;
switch(protocolNum) {
IR_SEND_PROTOCOL_01
However, the IRLib_P01_NEC.h is using 'data2' which is passing the wrong parameter for frequency.
#define IR_SEND_PROTOCOL_01 case 1: if(data2==0)data2=38;IRsendNEC::send(data,data2); break;
This should be changed to:
#define IR_SEND_PROTOCOL_01 case 1: if(khz==0)khz=38;IRsendNEC::send(data,khz); break;
The text was updated successfully, but these errors were encountered: