I am trying to add the sendPronto routine to the IRremoteESP8266 library.
I've gotten everything to compile properly but am always getting back a -2 (changed the sendPronto routine to return int's for return codes)
NOTE: the return 99 at the end will be changed to 0 once everything is working fine. Just wanted to make sure I was hitting that code.
Here is what I am sending from my B4R program
NOW I am sure this is properly formatted Pronto Code.
The line in the library that is sending me back the -2 is in IRremoteESP8266.cpp
The first value (kProntoTypeOffset = 0) is Zero. So I was confused to what was going on so I changed the line in the program to return what it was seeing
And it returned Zero. Which really confused me (and that is not hard to do lately) so I thought that maybe I was pointing to the wrong place so I
I change my Pronto String about to get rid of the first 0x0000 and have the 0x007e as the first entry
After changing the first grouping to 0x007e or 126 and the routine then returned to me a 126 (0x7e). (Which it should the value as not zero - just what I figured should happen)
But when the first entry was zero it still returned -2 (or now the value)
I AM SURE I just need another pair of eyes here. Something I am missing
BobVal
PS: Happy Easter everyone
I've gotten everything to compile properly but am always getting back a -2 (changed the sendPronto routine to return int's for return codes)
NOTE: the return 99 at the end will be changed to 0 once everything is working fine. Just wanted to make sure I was hitting that code.
Here is what I am sending from my B4R program
B4X:
Dim x() As UInt = Array As UInt(0x0000, 0x007e, 0x0022, 0x0000, 0x000a, 0x0046, 0x000a, 0x0046, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x036a, 0x000a, 0x0046, 0x000a, 0x0046, _
0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, _
0x0009, 0x0000)
Log("SendPronto:", mIRSend.SendPronto(x, x.Length, False))
NOW I am sure this is properly formatted Pronto Code.
The line in the library that is sending me back the -2 is in IRremoteESP8266.cpp
B4X:
// We only know how to deal with 'raw' pronto codes types. Reject all others.
if (data[kProntoTypeOffset] != 0) return -2; <----------- this is the bad boy. Value is Zero and it doesn't like it
The first value (kProntoTypeOffset = 0) is Zero. So I was confused to what was going on so I changed the line in the program to return what it was seeing
B4X:
// We only know how to deal with 'raw' pronto codes types. Reject all others.
if (data[kProntoTypeOffset] != 0) return data[kProntoTypeOffset]; //-2;
And it returned Zero. Which really confused me (and that is not hard to do lately) so I thought that maybe I was pointing to the wrong place so I
I change my Pronto String about to get rid of the first 0x0000 and have the 0x007e as the first entry
B4X:
Dim x() As UInt = Array As UInt(0x007e, 0x0022, 0x0000, 0x000a, 0x0046, 0x000a, 0x0046, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x036a, 0x000a, 0x0046, 0x000a, 0x0046, _
0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, _
0x000a, 0x0046, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, 0x000a, 0x001e, _
0x0009, 0x0000)
Log("SendPronto:", mIRSend.SendPronto(x, x.Length, False))
After changing the first grouping to 0x007e or 126 and the routine then returned to me a 126 (0x7e). (Which it should the value as not zero - just what I figured should happen)
But when the first entry was zero it still returned -2 (or now the value)
I AM SURE I just need another pair of eyes here. Something I am missing
BobVal
PS: Happy Easter everyone
Attachments
Last edited: