Skip to content

Commit

Permalink
Merge pull request #2752 from crankyoldgit/patch-1
Browse files Browse the repository at this point in the history
Allow IR messages with a data payload of zero.
  • Loading branch information
arendst authored May 17, 2018
2 parents eae5024 + 4b72080 commit 14ae3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonoff/xdrv_02_irremote.ino
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ boolean IrSendCommand()
protocol = root[UpperCase_P(parm_uc, PSTR(D_JSON_IR_PROTOCOL))];
bits = root[UpperCase_P(parm_uc, PSTR(D_JSON_IR_BITS))];
data = strtoul(root[UpperCase_P(parm_uc, PSTR(D_JSON_IR_DATA))], NULL, 0);
if (protocol && bits && data) {
if (protocol && bits) {
int protocol_code = GetCommandCode(protocol_text, sizeof(protocol_text), protocol, kIrRemoteProtocols);

snprintf_P(log_data, sizeof(log_data), PSTR("IRS: protocol_text %s, protocol %s, bits %d, data %u (0x%lX), protocol_code %d"),
Expand Down

0 comments on commit 14ae3e1

Please sign in to comment.