Skip to content

Problem in IRLib_P01_NEC.h not setting the modulation frequency correctly #57

@hiduino

Description

@hiduino

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions