Announcement

Collapse
No announcement yet.

Problem with images and ReturnIndicatorEx

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with images and ReturnIndicatorEx

    Hey!

    I'm trying to get a couple of images to be displayed from my C# plugin.

    I was able to display an image from my skin file using 'IMG', but when I try to use an indicator things don't work. I'm trying to use the same image in both methods.

    Some background... This plugin is a custom sirius plugin for my OEM sirius receiver. I'm trying to show the current sirius channel art. I can debug my plugin, and I can see that my custom indicator is getting called, as is the albumart indicator.

    Here is some example code:
    skin file:
    Code:
    I01,543,7,242,92,$RTGCANBUS_SIRIUS_FAV01$
    J01,543,7,242,92
    /IMG,543,7,242,92,"C:\Program Files (x86)\RideRunner\SRArt\20.png"
    plugin.cs
    Code:
    public string ReturnIndicator(string Ind)
    {
        string s = "";
    
        return s;
    }
    
    public string ReturnIndicatorEx(string Ind)
    {
        string s = "";
    
        if ((initd) && (active))
        {
            switch (Ind.ToLower())
            {
                case "rtgcanbus_sirius_art":
                    s = "C:/Program Files (x86)/RideRunner/SRArt/" + currentSiriusChannel.ToString() + ".png";
                    break;
    
                case "rtgcanbus_sirius_fav01":
                    s = "C:/Program Files (x86)/RideRunner/SRArt/20.png";
                    break;
    
                case "albumart":
                    s = "C:/Program Files (x86)/RideRunner/SRArt/20.png";
                    break;
            }
        }
    
        return s;
    }
    So... what am I doing wrong.... I have tried all of these options separately by commenting them out in both the skin file and the plugin.

    Thanks,
    Ryan

  • #2
    dont use ReturnIndicator, dont even have the function!


    just ReturnIndicatorEx

    on another note... i hope you generated your OWN GUIDS for the interface and class


    if you want some direct help... pm me
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

    Comment


    • #3
      Hey Mitch....

      I can't instatiate the sdk class without ReturnIndicator... using the sample c# plugin.. I'll try removing it from the sdk....

      and....
      I am generating my own GUIDs...

      Ryan

      Comment


      • #4
        you are right.... that isnt your problem anyway

        its been a while since i did one

        anyway...plugins are easily debugged

        albumart is a special indicator... you going to override it or any indicator
        you need to if active clear the IND


        case "albumart":
        s = "C:/Program Files (x86)/RideRunner/SRArt/20.png";
        Ind= "";
        break;

        since when exiting the plugin, the rr core will sill process the indicator as normal

        and albumart in and of itself is a tricky indicator, that switches its function depending on active source
        -Thanks
        Mitch
        www.rush2112.net

        "Did you test it in carwings??"

        Sun, Come shine my way
        May healing waters bury all my pain
        Wind, Carry me home
        The fabric of reality is tearing apart
        The piece of me that died
        Will return To live again

        Comment


        • #5
          also

          this doesnt look right

          I01,543,7,242,92,$RTGCANBUS_SIRIUS_FAV01$

          maybe

          I01,543,7,242,92,"RTGCANBUS_SIRIUS_FAV01"


          you KNOW SKIN TOOL IS YOUR BEST FRIEND
          -Thanks
          Mitch
          www.rush2112.net

          "Did you test it in carwings??"

          Sun, Come shine my way
          May healing waters bury all my pain
          Wind, Carry me home
          The fabric of reality is tearing apart
          The piece of me that died
          Will return To live again

          Comment


          • #6
            The quotes are what made it work....

            I didn't realize that my custom indicators needed to be surrounded with quotes... Is there a good FAQ that includes this kind of info?

            Also.... SkinTool..... WOW! I didn't even realize that tool existed... It is awesome.


            On a separate note, how do I make RR work such that I can enable my custom Sirius plugin's audio and corresponding information (channel, channel name, track name, etc.) to be heard and seen, and then when I switch to HD Radio or mp3 audio that those get disabled and the right audio and info is enabled.

            So I'm listening to my Sirius, then want to listen to HD Radio, so I click on the Radio button. When this happens, I want RR to automatically mute the Sirius, unmute the HD Radio, and only display info from the HD Radio. Going from mp3 audio to HD Radio and back all works correctly in the skins I've tried (LSX Void & Digital FX)...

            I have a workaround in place now, but I don't think it is the right way to do it....

            Thanks for everything so far! It has helped a bunch!

            Ryan

            Comment

            Working...
            X