Robert Valentino Well-Known Member Licensed User Longtime User Mar 22, 2020 #1 This is a continuation of this thread: https://www.b4x.com/android/forum/threads/add-sendpronto-to-ir-library.115222/ In IRremote.h there is this prototype Code: # if SEND_PRONTO void sendPronto (char* code, bool repeat, bool fallback) ; # endif I added this code to rIRremote.h and rIRremote.cpp In h file added prototype Code: void SendPronto(string data, bool repeat, bool fallback); In c file I added Code: void IrSend::SendPronto(string data, bool repeat, bool fallback) { ir.sendPronto(data, repeat, fallback); } Created the proper xml file with new method Code: <method><name DesignerName="SendPronto">SendPronto</name><returntype>B4R::void</returntype><parameter><name>data</name><type>B4R::string</type></parameter><parameter><name>repeat</name><type>bool</type></parameter><parameter><name>fallback</name><type>bool</type></parameter></method> Refreshed my libraries but still when I type Code: Public IRControl As IrSend IRControl.Enable(5, 38) IRControl. <------ All the different available type of calls show up in the IDE list but NOT the SendPronto I added. I am sure I am doing something simple wrong. Attaching ALL the files I modified from Erel's original post Attachments irRemote.zip irRemote.zip 2.9 KB · Views: 594
This is a continuation of this thread: https://www.b4x.com/android/forum/threads/add-sendpronto-to-ir-library.115222/ In IRremote.h there is this prototype Code: # if SEND_PRONTO void sendPronto (char* code, bool repeat, bool fallback) ; # endif I added this code to rIRremote.h and rIRremote.cpp In h file added prototype Code: void SendPronto(string data, bool repeat, bool fallback); In c file I added Code: void IrSend::SendPronto(string data, bool repeat, bool fallback) { ir.sendPronto(data, repeat, fallback); } Created the proper xml file with new method Code: <method><name DesignerName="SendPronto">SendPronto</name><returntype>B4R::void</returntype><parameter><name>data</name><type>B4R::string</type></parameter><parameter><name>repeat</name><type>bool</type></parameter><parameter><name>fallback</name><type>bool</type></parameter></method> Refreshed my libraries but still when I type Code: Public IRControl As IrSend IRControl.Enable(5, 38) IRControl. <------ All the different available type of calls show up in the IDE list but NOT the SendPronto I added. I am sure I am doing something simple wrong. Attaching ALL the files I modified from Erel's original post
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2020 #2 Better to rename the XML file. The case is incorrect. There is no type named string. Change it to B4RString* and pass Str->data to the native method. Upvote 0
Better to rename the XML file. The case is incorrect. There is no type named string. Change it to B4RString* and pass Str->data to the native method.
Robert Valentino Well-Known Member Licensed User Longtime User Mar 23, 2020 #3 I feel I have everything right now. But yet it still do not see the function SendPronto, feel like such a bozo Attachments irRemote.zip irRemote.zip 2.9 KB · Views: 559 Upvote 0
I feel I have everything right now. But yet it still do not see the function SendPronto, feel like such a bozo
bdunkleysmith Active Member Licensed User Longtime User Mar 24, 2020 #4 Are you sure all of the library files have actually been copied to the B4R library folder? I ask this because when I updated the rIRremote and rIRremoteESP8266 to v1.01 and v1.13 respectively, to provide IR support for Foxtel cable/satellite TV boxes in Australia as per this post I found that although I thought I'd copied the updated library files, they hadn't actually copied because administrator rights was required. I added your PRONTO method to my rIRremote.xml, updated its version number to 1.02 and as per the screenshot, the function SendPronto is available. I can't test beyond that because I don't have a PRONTO device. Upvote 0
Are you sure all of the library files have actually been copied to the B4R library folder? I ask this because when I updated the rIRremote and rIRremoteESP8266 to v1.01 and v1.13 respectively, to provide IR support for Foxtel cable/satellite TV boxes in Australia as per this post I found that although I thought I'd copied the updated library files, they hadn't actually copied because administrator rights was required. I added your PRONTO method to my rIRremote.xml, updated its version number to 1.02 and as per the screenshot, the function SendPronto is available. I can't test beyond that because I don't have a PRONTO device.
Robert Valentino Well-Known Member Licensed User Longtime User Mar 24, 2020 #5 Figured out what it was. I have both the rIRremote checked and rIRremoteESP8266 checked and the rIRremoteESP8266 was over-riding the other library. I am using a ESP8266 so maybe I made the changes to the wrong library and need to make them to the rIRremoteESP8266 instead. Thanks - you got me looking in a different direction which let me find my way. Attachments 1585059636356.png 5.3 KB · Views: 620 Upvote 0
Figured out what it was. I have both the rIRremote checked and rIRremoteESP8266 checked and the rIRremoteESP8266 was over-riding the other library. I am using a ESP8266 so maybe I made the changes to the wrong library and need to make them to the rIRremoteESP8266 instead. Thanks - you got me looking in a different direction which let me find my way.