Announcement

Collapse
No announcement yet.

Display the Status of a Custom Indicator as Text?

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

  • Display the Status of a Custom Indicator as Text?

    I want to create a custom Indicator called !Window, and when I hit a particular button I want it to toggle between setting the indicator ON and OFF. I am using the SWITCHBUTTON in the button code to do that toggle.

    My questions are:
    1) Can I get the status of my custom indicator to show up as text in the LABEL of the button, and what is the syntax for that?

    2) Can I write the status of my custom indicator to an ini file ( or some other better way) so that the correct indicator is showing when I restart RideRunner?

    I am using this button to toggle between 2 states of GPS controlled volume, and in the past I was using SWITCHLABEL and SWITCHBUTTON to toggle between the 2 states. This however does not show the actual status of the setting but reverts to the first state of the SWITCHLABEL when I restart RR.

    Here is the code I was trying to use to display the text as a Label:
    Code:
    L6,516,527,71,50,#DFX1R#,#DFX1G#,#DFX1B#,20,"Nissan:B","!WINDOW","CENTER"
    Here is my button code:
    Code:
    B5,500,526,100,74,"SETVAR;speedatt;$p1speedatt$||
    SETVAR;speedattmute;$p1speedattmute$||
    SETVAR;speedattunit;$p1speedattunit$||
    SETVAR;speedattvola;$p1speedattvola$||
    SETVAR;speedattvolb;$p1speedattvolb$||
    SETVAR;speedattspeeda;0||
    SETVAR;speedattspeedb;$pspeedattspeedb$||
    SETVAR;speedattmode;line||
    SETVAR;speedattmute;$p1speedattmute$||
    SETVAR;speedattmaxstep;15||
    SAVETOINI;speedatt;$p1speedatt$||
    SAVETOINI;speedattmute;$p1speedattmute$||
    SAVETOINI;speedattunit;$p1speedattunit$||
    SAVETOINI;speedattvola;$p1speedattvola$||
    SAVETOINI;speedattvolb;$p1speedattvolb$||
    SAVETOINI;speedattspeeda;0||
    SAVETOINI;speedattspeedb;$p1speedattspeedb$||
    SAVETOINI;speedattmode;line||
    SAVETOINI;speedattmute;$p1speedattmute$||
    SAVETOINI;speedattmaxstep;15||
    "SETIND;!WINDOW;OFF"||
    SWITCHBUTTON;5>>
    "SETVAR;speedatt;$p2speedatt$||
    SETVAR;speedattmute;$p2speedattmute$||
    SETVAR;speedattunit;$p2speedattunit$||
    SETVAR;speedattvola;$p2speedattvola$||
    SETVAR;speedattvolb;$p2speedattvolb$||
    SETVAR;speedattspeeda;0||
    SETVAR;speedattspeedb;$pspeedattspeedb$||
    SETVAR;speedattmode;line||
    SETVAR;speedattmute;$p2speedattmute$||
    SETVAR;speedattmaxstep;15||
    SAVETOINI;speedatt;$p2speedatt$||
    SAVETOINI;speedattmute;$p2speedattmute$||
    SAVETOINI;speedattunit;$p2speedattunit$||
    SAVETOINI;speedattvola;$p2speedattvola$||
    SAVETOINI;speedattvolb;$p2speedattvolb$||
    SAVETOINI;speedattspeeda;||
    SAVETOINI;speedattspeedb;$pspeedattspeedb$||
    SAVETOINI;speedattmode;line||
    SAVETOINI;speedattmute;$p2speedattmute$||
    SAVETOINI;speedattmaxstep;15||
    "SETIND;!WINDOW;ON"||
    SWITCHBUTTON;5",""
    CAR: 2007 G35 Sport Coupe 5AT
    HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

  • #2
    You can do these things using a variable, but not with the custom indicator alone.

    Try this:
    Code:
    L6,516,527,71,50,#DFX1R#,#DFX1G#,#DFX1B#,20,"Nissan:B","BYVAR;VARWINDOW;OFF<<ON","CENTER"
    with this:
    Code:
    B5,500,526,100,74,"SETVAR;speedatt;$p1speedatt$||
    SETVAR;speedattmute;$p1speedattmute$||
    SETVAR;speedattunit;$p1speedattunit$||
    SETVAR;speedattvola;$p1speedattvola$||
    SETVAR;speedattvolb;$p1speedattvolb$||
    SETVAR;speedattspeeda;0||
    SETVAR;speedattspeedb;$pspeedattspeedb$||
    SETVAR;speedattmode;line||
    SETVAR;speedattmute;$p1speedattmute$||
    SETVAR;speedattmaxstep;15||
    SAVETOINI;speedatt;$p1speedatt$||
    SAVETOINI;speedattmute;$p1speedattmute$||
    SAVETOINI;speedattunit;$p1speedattunit$||
    SAVETOINI;speedattvola;$p1speedattvola$||
    SAVETOINI;speedattvolb;$p1speedattvolb$||
    SAVETOINI;speedattspeeda;0||
    SAVETOINI;speedattspeedb;$p1speedattspeedb$||
    SAVETOINI;speedattmode;line||
    SAVETOINI;speedattmute;$p1speedattmute$||
    SAVETOINI;speedattmaxstep;15||
    SETIND;!WINDOW;OFF||
    SETVAR;VARWINDOW;0||
    SAVETOINI;VARWINDOW;$VARWINDOW$||
    SWITCHBUTTON;5>>
    "SETVAR;speedatt;$p2speedatt$||
    SETVAR;speedattmute;$p2speedattmute$||
    SETVAR;speedattunit;$p2speedattunit$||
    SETVAR;speedattvola;$p2speedattvola$||
    SETVAR;speedattvolb;$p2speedattvolb$||
    SETVAR;speedattspeeda;0||
    SETVAR;speedattspeedb;$pspeedattspeedb$||
    SETVAR;speedattmode;line||
    SETVAR;speedattmute;$p2speedattmute$||
    SETVAR;speedattmaxstep;15||
    SAVETOINI;speedatt;$p2speedatt$||
    SAVETOINI;speedattmute;$p2speedattmute$||
    SAVETOINI;speedattunit;$p2speedattunit$||
    SAVETOINI;speedattvola;$p2speedattvola$||
    SAVETOINI;speedattvolb;$p2speedattvolb$||
    SAVETOINI;speedattspeeda;||
    SAVETOINI;speedattspeedb;$pspeedattspeedb$||
    SAVETOINI;speedattmode;line||
    SAVETOINI;speedattmute;$p2speedattmute$||
    SAVETOINI;speedattmaxstep;15||
    SETIND;!WINDOW;ON||
    SETVAR;VARWINDOW;1||
    SAVETOINI;VARWINDOW;$VARWINDOW$||
    SWITCHBUTTON;5",""
    Keep your custom indicator as is, but you should execute this when loading the screen or skin (i.e. using ONSKINSTART) to restore the custom indicator after starting RR:

    Code:
    "BYVAR;VARWINDOW;<<SETIND;!WINDOW;ON"
    NOTE: I assume you DO NOT actually have those line breaks in the .skin file or it certainly would not work as everything has to be in the same line...
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

    Comment


    • #3
      couldnt you also use byvar to do somehting like this? When you set the save the variable, use savetoini;myvatname;test then when rr loads it will set myvar to "test" as thats whats in the ini. then use ByVar on that variable to determine what to do. You can then display the variable as a label.

      I hope I said that all right, I am in China and going on little sleep for the past few days....
      Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

      My Fiero Build Thread

      Comment


      • #4
        lol you have to go all the way to china just to sleep lol....
        Riderunner / Genesis
        Plugin Breaker in test BassRR Plugin Player, Wifiman_NET
        New Home for Genesis & BassRR :adding to site ,, Hellfyre night
        Bassrr Beta Release :Version 1.3.7
        Movie_info Release :Version 3.1.0
        Wifiman_NET:Version 1.0.0

        Every Future, Needs A Beginning

        Comment


        • #5
          RideRunner...The #1 FE, PERIOD.

          Current Project: DFXVoice [v1.0 Released]
          Next in line: RRMedia v2.0

          DFX 5.1.1 Skin
          Appstore Link

          My RideRunner Plugins
          RRMedia
          RRExtended
          DFXVoice

          "There are no bugs - only undocumented features."

          Comment


          • #6
            Wow that actually seems to make sense. I will try all that.

            Yes you assume correct. I only have one line in the code. I just thought with such a long command it would be easier to read with the line breaks.
            CAR: 2007 G35 Sport Coupe 5AT
            HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

            Comment


            • #7
              Originally posted by carputer1 View Post
              lol you have to go all the way to china just to sleep lol....
              Originally posted by Blue ZX3 View Post
              Yea yea yea.....

              But even on the opposite side of the planet, it does not prevent the on going nagging of "When is the skin going to be released?"

              LOL
              Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

              My Fiero Build Thread

              Comment


              • #8
                Originally posted by guino View Post
                You can do these things using a variable, but not with the custom indicator alone.

                Try this:...
                So I tried this and still have no text displaying in my button.

                Also the purpose of the button is to toggle between 2 different sets of variables of GPS speed controled volume. The windows up (OFF) volume starts at 65% at stop and slowly goes to 100% at 80mph. The Windows down (ON) volume starts at 40% and quickly got to 100% at 50mph.

                With the changes you proposed, the volume goes to 0% at skin start.

                Any further suggestions?
                CAR: 2007 G35 Sport Coupe 5AT
                HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

                Comment


                • #9
                  I am out of town for a few more days, so not at my desktop puter to try to test stuff.

                  My thought is simple though, when you press the button, make part of that button code to save your variable in the rr.ini, press the button again, save the other value you want. then when rr starts, that variable will be loaded, and avail for use and display. To display a variable you have to use a label, with the code =$YourVariableName$


                  Having the volume go to 0 at skin start, means you are not setting the volume to match what the variable is that you saved is my thinking.
                  Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

                  My Fiero Build Thread

                  Comment


                  • #10
                    Well John that wast the solution. The text alternates back and forth between ON and OFF. However all I have really accomplished is a more complex way of what I was already doing with Switchlabel and Switchbutton.

                    See the problem now is that if I close RR in the ON position, it takes 2 button pushes to get to the off position the first time. The first half of the code is ON, and the second half obviously OFF. But if I close RR ON, with the first button push being ON, it takes the second button push to be OFF.

                    Is there a way to accomplish this so the button is in the right state on RR start.

                    Make sense?
                    CAR: 2007 G35 Sport Coupe 5AT
                    HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

                    Comment


                    • #11
                      Ok, here is my much more organized version that has been fully tested and works!

                      Add "WinPresetLoad" to the skins "ONSKINSTART" cmd

                      Change your button cmd to:

                      Code:
                      B5,500,526,100,74,"WinPresetToggle"
                      Change your label to:

                      Code:
                       L6,516,527,71,50,#DFX1R#,#DFX1G#,#DFX1B#,20,"Nissan:B","=$WinVolLabel$","CENTER"
                      Put in either RR's or skin's 'Exectbl.ini' file

                      Code:
                      /-- Main Cmds
                      "WinPresetToggle","BYVAR;WinPresetLoaded;WinDnVolPreset<<WinUpVolPreset"
                      "WinPresetLoad","SETVAR;speedattmode;line||SAVETOINI;speedattmode;line||SETVAR;speedattmaxstep;15||SAVETOINI;speedattmaxstep;15||SETVAR;speedattspeeda;0||BYVAR;WinPresetLoaded;WinUpVolPreset<<WinDnVolPreset"
                      / Preset#0
                      "WinUpVolPreset","SETVAR;WinPresetLoaded;0||SAVETOINI;WinPresetLoaded;0||SETVAR;WinVolLabel;OFF||SAVETOINI;WinVolLabel;OFF||SETIND;!WINDOW;OFF||SETVAR;speedatt;$p1speedatt$||SETVAR;speedattmute;$p1speedattmute$||SETVAR;speedattunit;$p1speedattunit$||SETVAR;speedattvola;$p1speedattvola$||SETVAR;speedattvolb;$p1speedattvolb$||SETVAR;speedattspeedb;$p1speedattspeedb$"
                      / Preset#1
                      "WinDnVolPreset","SETVAR;WinPresetLoaded;1||SAVETOINI;WinPresetLoaded;1||SETVAR;WinVolLabel;ON||SAVETOINI;WinVolLabel;ON||SETIND;!WINDOW;ON||SETVAR;speedatt;$p2speedatt$||SETVAR;speedattmute;$p2speedattmute$||SETVAR;speedattunit;$p2speedattunit$||SETVAR;speedattvola;$p2speedattvola$||SETVAR;speedattvolb;$p2speedattvolb$||SETVAR;speedattspeedb;$p2speedattspeedb$"
                      Add or set in 'rr.ini' ( the mute's and unit's i was unsure of so you can fill those in )

                      Code:
                      /-- Saved State
                      WinPresetLoaded=0
                      
                      /-- Button Txt
                      WinVolLabel=OFF
                      
                      /-- preset#1
                      p1speedatt=True
                      p1speedattmute=
                      p1speedattunit=
                      p1speedattvola=65
                      p1speedattvolb=100
                      p1speedattspeeda=0
                      p1speedattspeedb=80
                      
                      /-- preset#2
                      p2speedatt=True
                      p2speedattmute=
                      p2speedattunit=
                      p2speedattvola=40
                      p2speedattvolb=100
                      p2speedattspeeda=0
                      p2speedattspeedb=50
                      RideRunner...The #1 FE, PERIOD.

                      Current Project: DFXVoice [v1.0 Released]
                      Next in line: RRMedia v2.0

                      DFX 5.1.1 Skin
                      Appstore Link

                      My RideRunner Plugins
                      RRMedia
                      RRExtended
                      DFXVoice

                      "There are no bugs - only undocumented features."

                      Comment


                      • #12
                        Hey Blue,

                        This works great. You must enjoy challenges. My only problem is that on my system, the volume always comes back at 50% whether in the ON or OFF state on exit. First button press it does correct itself to the next correct state. Any ideas.
                        CAR: 2007 G35 Sport Coupe 5AT
                        HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

                        Comment


                        • #13
                          Seeing that every value is written to rr.ini, and when RR loads any values in a skin.ini will overider the rr.ini ones. Recheck your skin ini for any of those values, and delete them if found. This is really the only thing that could be causing this odd effect.

                          My Testing was on my DT w/o any gps, so as soon as i start up RR, its already set the vol to the correctly loaded preset, and pressing the btn, the vol raises/lowers to proper levels.
                          RideRunner...The #1 FE, PERIOD.

                          Current Project: DFXVoice [v1.0 Released]
                          Next in line: RRMedia v2.0

                          DFX 5.1.1 Skin
                          Appstore Link

                          My RideRunner Plugins
                          RRMedia
                          RRExtended
                          DFXVoice

                          "There are no bugs - only undocumented features."

                          Comment


                          • #14
                            That is kind of what I thought. I will go through the ini files carefully.

                            By the way. Much thanks are in order for helping with this. I know you program a lot of things from scratch, where I am more of a copy and paste type, but I go over the methods to learn as much as I can.

                            So Thanks for the help.

                            Edit: So the solution seems to be that all of this button stuff overrides the built in GPS Speed Attenuation, so i went into the RRConfig and disabled it. That was where the 50% was coming from. RR now opens with the correct last set volume.

                            Edit 2: Okay so this was boneheaded. The above edit about the built in GPS Speed was incorrect. What the solution was, is that I did not follow directions, and forgot to add the ONSKINSTART command "WinPresetLoad"

                            Okay next question. The double bar "||" I know is used to seperate code items in RR. The font I want to use on this button uses a single bar. However that puts three bars next to each other in the code. Is there a way to seperate the single bar I actually want to use for the font "|" from the double bar "||" code seperation.
                            CAR: 2007 G35 Sport Coupe 5AT
                            HARDWARE: Dell D630 w/ dock, internal 80G HD, internal 320G HD, Verizon Wireless Card, iBlue GM-2 GPS w/iGuidance, OBDPros w/DashCommand, Visteon HD Radio w/ Home Made Cable, Current Version of RR w/ DFX Skin. My Install.

                            Comment


                            • #15
                              Post your example
                              RideRunner...The #1 FE, PERIOD.

                              Current Project: DFXVoice [v1.0 Released]
                              Next in line: RRMedia v2.0

                              DFX 5.1.1 Skin
                              Appstore Link

                              My RideRunner Plugins
                              RRMedia
                              RRExtended
                              DFXVoice

                              "There are no bugs - only undocumented features."

                              Comment

                              Working...
                              X