Commit a58f50eb authored by ksankark's avatar ksankark
Browse files

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).
parent 3b80bc44
...@@ -57,7 +57,7 @@ do ...@@ -57,7 +57,7 @@ do
pulse(pin, NEC_HDR_MARK) pulse(pin, NEC_HDR_MARK)
waitus(NEC_HDR_SPACE) waitus(NEC_HDR_SPACE)
-- sequence, lsb first -- sequence, lsb first
for i = 0, 31 do for i = 31, 0, -1 do
pulse(pin, NEC_BIT_MARK) pulse(pin, NEC_BIT_MARK)
waitus(isset(code, i) and NEC_ONE_SPACE or NEC_ZERO_SPACE) waitus(isset(code, i) and NEC_ONE_SPACE or NEC_ZERO_SPACE)
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment