Results 1 to 7 of 7

Thread: RR logic statements

  1. #1
    Constant Bitrate ACCLR8N's Avatar
    Join Date
    Apr 2009
    Location
    Davisburg, MI
    Posts
    195

    RR logic statements

    I'm trying to configure day night skin switching based on the headlights using a Fusion Brain. I see RRExtended will execute a command based on a variable value. I need to reference two or three variables as I would like to be able to manually override the automatic settings. Is this possible with RRExtended?

  2. #2
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,079
    Sure, for that you wouldn't even need a RRExtended cmd.

    Example..


    DNS_Auto=true (setting created in rr.ini)

    On your manual btns, cmds such as..

    *Day btn
    "SETVAR;DNS_Auto;false||SAVETOINI;DNS_Auto;false|| DAYSKIN"

    *NightDay btn
    "SETVAR;DNS_Auto;false||SAVETOSKIN;DNS_Auto;false| |NIGHTSKIN"

    *Auto skin btn
    "SETVAR;DNS_Auto;true||SAVETOINI;DNS_Auto;true||$D NS_CMD$"

    Then make a RR Exectbl.ini (in root RR folder) cmd line..for the MDX SW to call

    "DNS_Check","BYVAR;$DNS_Auto$;DONOTHING<<$DNS_CMD$ "

    Just as an 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."

  3. #3
    Constant Bitrate ACCLR8N's Avatar
    Join Date
    Apr 2009
    Location
    Davisburg, MI
    Posts
    195
    Thanks for your help.

    If I set the DNS_Auto default to true in each skin's skin.ini, won't it go back to auto mode after switching skins?

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Quote Originally Posted by ACCLR8N View Post
    Thanks for your help.

    If I set the DNS_Auto default to true in each skin's skin.ini, won't it go back to auto mode after switching skins?
    Whatever you set "default" in skin.ini will be loaded when you switch to that skin -- this is correct. If you want to make a "persistent" setting that will be loaded by default and will not change when loading skins, you want to use RR.INI instead of SKIN.INI and SAVETOINI instead of SAVETOSKIN. The syntax and everything is the same, except what's in RR.INI is loaded when you start RR (not the skin). If you use one skin only it will basically have the same effect.
    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."

  5. #5
    Constant Bitrate ACCLR8N's Avatar
    Join Date
    Apr 2009
    Location
    Davisburg, MI
    Posts
    195
    What I'm seeing is that the DNS_Auto variable is permanently set to false. I'd like it to revert to true when the lights are on and night is selected or lights are off and day selected. At the very least back to true when RR restarted.

    The logic part in the Exectbl.ini escapes me. I have a variable fusion_varnum_40_1 that when it goes over 3.5 I want the NIGHTSKIN comand sent. Below 3.5, DAYSKIN. I'm not using RRFusion. I'm running MDX to RR COMs.

  6. #6
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,079
    oh, well you didn't say that...

    So now I have updated the above posting. From the MDX SW you need to execute either one of the two cmd sets depending on your var in MDX.

    lights on
    "SETVAR;DNS_CMD;NIGHTSKIN||DNS_CHECK"

    lights off
    "SETVAR;DNS_CMD;DAYSKIN||DNS_CHECK"

    This will set what skin should be loaded and then runs the 'DNS_CHECK' cmd which will only auto adj if you have set the RR var DNS_AUTO to true. And if its off when you re-enable it, then it should load the correct skin depending on if the lights are on/off.

    If you want to always have it set to auto when starting RR then just put the 'DNS_AUTO=true' in your rr.ini and use the following three btn cmds instead.

    *Day btn
    "SETVAR;DNS_Auto;false|| DAYSKIN"

    *NightDay btn
    "SETVAR;DNS_Auto;false| |NIGHTSKIN"

    *Auto skin btn
    "SETVAR;DNS_Auto;true||$D NS_CMD$"

    Using this, RR will start up with the 'DNS_AUTO' var set to true always and we'll just change its value in mem only w/o saving it.
    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."

  7. #7
    Constant Bitrate ACCLR8N's Avatar
    Join Date
    Apr 2009
    Location
    Davisburg, MI
    Posts
    195
    I am not getting anywhere having the Fusion Brain MDX send an external command from a logic statement. The typical response is that the external command line disappears from the xml file when the condition is true. Evaporated. I can send variables to RR and I can send MDX commands from RR.

    What I'm missing is to have RR decide the variable is over 3.5 and initiate the "SETVAR;DNS_CMD;fusion_vote_nightskin||NIGHTSKIN|| DNS_CHECK"

    Failed MDX:
    command
    Code:
          <executable_commands>
            <external_COM_id id="RoadRunner.SDK">
              <command internal_id="roadrunnercommand_nightskin" external_command="Execute">
                <parameter order="0" external_command_parameter="setvar;dns_cmd;nightskin||dns_check"/>
              </command>
              <command internal_id="roadrunnercommand_dayskin" external_command="Execute">
                <parameter order="0" external_command_parameter="setvar;dns_cmd;dayskin||dns_check"/>
              </command>
            </external_COM_id>
          </executable_commands>
    logic
    Code:
          <if fire_on="logic" minimum_delta_vote_time="100" id="Day_Night_skin">
            <boolean_operation type="greater than">
              <parameter1>
                <analogue id="Lights" time="0"></analogue>
              </parameter1>
              <parameter2>
                <number>3.5</number>
              </parameter2>
            </boolean_operation>
            <then>
              <do function="External Command" functionTargetID="roadrunnercommand_nightskin" vote_opinion="" vote_priority="Low"></do>
            </then>
          </if>

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2009, 05:56 AM
  2. Switching between RR and copilot
    By CombatCQB in forum Road Runner
    Replies: 13
    Last Post: 01-26-2009, 05:27 PM
  3. RR Black screen of death?
    By maxxell in forum Road Runner
    Replies: 7
    Last Post: 12-17-2008, 09:23 PM
  4. RR Newb... need help/suggestions.
    By Nola111 in forum Road Runner
    Replies: 19
    Last Post: 03-12-2007, 07:10 PM
  5. Replies: 0
    Last Post: 06-11-2006, 05:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •