Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Skin Programming

  1. #1
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503

    Skin Programming

    I was working on a climate control skin a while back when we were working with just the Alpha version (non-MDX) and just starting with the multi-image stuff and all. I kinda faded away for a while due to work and life but I have some time now to get into this again. I have a different car now so as of now I don't need to get to complex with climate controls, but as i've been playing with MDX it seems that the programming from Alpha-non-MDX doesn't work. I can't seem to really figure out the Configurator program plus i like to just write the config file myself.

    Basically I was wondering if you could just quick write out a quick instance in the skin code for me?

    One that I need is: IF Variable_Analogue_Input_0 < 3 THEN switch Digital Output 1 ON

    Also... IF Variable_Analogue_Input_0 < 3 THEN roadrunnercommand_stop

    I hate to be bother and ask newbie questions and ask for code lines but i think with these 2 I should be pretty set. Thanks for the help!

  2. #2

  3. #3
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    For the RR Command part: http://www.mp3car.com/vbulletin/fb-s...ig-update.html

    And you are more than welcome to write the code yourself instead of using the configurator.

    To get the syntax down, maybe using the configurator and seeing the code it generates would be useful for you.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  4. #4
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503
    That recorded walk through of the Configurator helped me out a a lot. Thanks!

    Basically what I'm doing here is making it so that if I turn the key off in the car but the PSU shutdown timer hasn't turned the PC off yet that the FB will sense the loss of voltage and pause the music in RR.

    I got it all working using IF input < 3volts then roadrunnercommand_pause but my only concern is that it keeps looping and constantly sending the pause command to RR. Is there a way to make this only occur once?

  5. #5
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by bratnetwork View Post
    That recorded walk through of the Configurator helped me out a a lot. Thanks!

    Basically what I'm doing here is making it so that if I turn the key off in the car but the PSU shutdown timer hasn't turned the PC off yet that the FB will sense the loss of voltage and pause the music in RR.

    I got it all working using IF input < 3volts then roadrunnercommand_pause but my only concern is that it keeps looping and constantly sending the pause command to RR. Is there a way to make this only occur once?
    if input < 3, variable++
    if varaible = 1, pause
    if input >= 3 variable = 0
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  6. #6
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503
    i thought of that, but once the variable is set as 1 it will still loop the pause command bc it wont be set back to 0 till I turn the key back on in the car

    i tried to do:
    IF
    variable = 0
    AND
    input < 3
    THEN
    DO pause
    DO variable = 1

    it works if i leave out the "DO variable = 1" line and if i manually change the variable in the config file to 1 then obviously it wont run the statement bc it doesnt meet the criteria which is correct, but as soon as i add in the second "DO" line to change the variable it won't pause on voltage loss

  7. #7
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503
    Code:
    <if fire_on="logic" minimum_delta_vote_time="250" id="RR_PAUSE_LOGIC">
            <boolean_operation type="and">
              <parameter1>
                <boolean_operation type="equal to">
                  <parameter1>
                    <variable do="get" name="Variable_RR_PAUSE"></variable>
                  </parameter1>
                  <parameter2>
                    <number>0</number>
                  </parameter2>
                </boolean_operation>
              </parameter1>
              <parameter2>
                <boolean_operation type="less than">
                  <parameter1>
                    <analogue id="Analogue Input 0" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>3</number>
                  </parameter2>
                </boolean_operation>
              </parameter2>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="roadrunnercommand_pause" vote_opinion="filler" vote_priority="Medium"></do>
        	<do function="Change Variable" functionTargetID="Variable_RR_PAUSE" vote_opinion="1" vote_priority="Medium"></do>
    		</then>
          </if>

  8. #8
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503
    Any ideas? Am I doing something wrong?

  9. #9
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by bratnetwork View Post
    i thought of that, but once the variable is set as 1 it will still loop the pause command bc it wont be set back to 0 till I turn the key back on in the car
    It wont loop, because it only fires when it is equal to 1. Every iteration it will increment.

    So normal operation, it is greater than 3, so variable = 0;

    As soon as input < 3, variable increments.

    If variable == 1, then pause music.


    Because next iteration, input < 3, so increment variable again, now variable is 2. variable no longer equals 1, no other vote is registered. Next time variable is 3, which is not 1 nothing is registered.

    Now when input > 3 again, variable = 0. variable != 1, so no pause vote fired.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  10. #10
    Maximum Bitrate bratnetwork's Avatar
    Join Date
    Oct 2007
    Location
    Haledon, NJ
    Posts
    503
    Does my code above look right? when I add in the line about changing the variable mdx won't even open. if i take that line out it works but obviously since its not changing the variable it just loops the pause effect.

Page 1 of 2 12 LastLast

Similar Threads

  1. Virtual Earth cache builder? Or even gps simulator to make it cache?
    By thepunkerguy in forum DigitalMods (Scripts / API)
    Replies: 183
    Last Post: 08-28-2008, 08:58 PM
  2. RockCar Front End Update 0.0.0.26 800x480 Skin Added
    By Hessian in forum Software & Software Development
    Replies: 7
    Last Post: 07-25-2008, 03:04 PM
  3. Replies: 65
    Last Post: 07-23-2008, 02:03 AM
  4. MMI eXtnd
    By proTONEd in forum FP Skins
    Replies: 77
    Last Post: 04-17-2008, 05:26 AM

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
  •