From a58f50eb30ca4f32113a5f624c0967915b8c18a3 Mon Sep 17 00:00:00 2001 From: ksankark Date: Fri, 13 Feb 2015 11:13:00 +0530 Subject: [PATCH] Update irsend.lua The for loop was reverse because of that when i transfer 0xfff000ff i have received 0xff000fff. This update works perfect (I have tested this by receiving through Arduino IRreceiver). --- lua_examples/irsend.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua_examples/irsend.lua b/lua_examples/irsend.lua index 6469a4c0..ed1cb98b 100644 --- a/lua_examples/irsend.lua +++ b/lua_examples/irsend.lua @@ -57,7 +57,7 @@ do pulse(pin, NEC_HDR_MARK) waitus(NEC_HDR_SPACE) -- sequence, lsb first - for i = 0, 31 do + for i = 31, 0, -1 do pulse(pin, NEC_BIT_MARK) waitus(isset(code, i) and NEC_ONE_SPACE or NEC_ZERO_SPACE) end