B4R Question SOLVED - Calling SendPronto

Robert Valentino

Well-Known Member
Licensed User
Longtime User
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
B4X:
#        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
B4X:
void  SendPronto(string data,  bool repeat, bool fallback);

In c file I added
B4X:
    void  IrSend::SendPronto(string data, bool repeat, bool fallback) {
        ir.sendPronto(data, repeat, fallback);
    }

Created the proper xml file with new method
B4X:
<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

B4X:
    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
    2.9 KB · Views: 307

Robert Valentino

Well-Known Member
Licensed User
Longtime User
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
    2.9 KB · Views: 290
Upvote 0

bdunkleysmith

Active Member
Licensed User
Longtime User
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.

1585008137162.png
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
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
    1585059636356.png
    5.3 KB · Views: 253
Upvote 0
Top