Announcement

Collapse
No announcement yet.

Fusion Control Centre Uber Edition -- Need Testers

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

  • Fusion Control Centre Uber Edition -- Need Testers

    EDIT: Uber MDX is now the official software for the Fusion Brain. You can download it from here



    ================ Uber XNA is dead, Please follow the link above for MDX software ================

    Ok, I think the newest version is complete enough for you guys to download and try out. Start making skins. It does read Analogue Values and write Digital Output Values but not Digital Ins right now.

    The skinning is done by an xml file now. I hope it to be rather self explanatory. Then there is the biggest part. The logic. For those that do not know here is how it works:

    Every button or display or logic if/then statement votes on what to do. Then every output tallies its independant votes and decides whether or not it should turn on or off. There are 3 priority levels. Any high priority vote automatically outweighs any number of medium priority votes. Same with medium priority over low priority. Defalt is medium. If there are contradictory votes, it tallies them fully democratically. If there is a tie, it gives up and doesnt change. For example, if there are 3 votes for turning on and 2 for turning off of the same priority, then it will turn on.

    Now the logic portion is sort of like programming in my own little xml based language. I think it is intuitive. And you can create functions to make the code less repetitive. Each analogue port can store a user settable number of history points too. So an averager of time 0 and time 1, would be to add then and divide by 2 type thing. However averaging over any "n" number of points is built in already.

    The main options to choose from are AND/OR/NOT/NAND/NOR/XOR and then add/subtract/multiply/divide as well as "greater than"/"less than"/"greater than or equal to"/"less than or equal to"

    The included skin file contains all the working options at some point or another to pick from. Of course if you have specific questions I will always answer.

    I am of course still working on it. If there is something for your skin you want done, let me know and I will try to finish that part sooner. Expect updates to be very close to eachother now that I have tomorrow off and friday morning off.
    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

  • #2
    dl'd it, I'll try to check it out this weekend
    MY NEWEST INSTALL:modded infiniti fx with big screen

    first windows carpc install........my liquid cooled LVDS screen :D

    Comment


    • #3
      It's looking good so far, I've just started; time to dust off that Modernity thread. I'll post what I find as I go.

      EDIT:
      I see how you use a button to increment the "wantedtemperature" variable by one. I'm looking to declare a boolean variable in <logic><all_variables> and set it's value to change it's state from off to on and back, and affect it with the "change variable" function property of a button.

      Do I have to specify somehow that the variable is the boolean type?
      Do I put "on" in the vote opinion field?
      How does that work?

      More plainly put, "How do I toggle a boolean variable with the state of a button?"


      EDIT: Looks like button sizes have changed, given the same images, and x,y size declaration as I used in ver2. I'm not sure why, but it looks like I have to resize them again to fit.
      It's been a while...

      Comment


      • #4
        Originally posted by h3rk View Post
        It's looking good so far, I've just started; time to dust off that Modernity thread. I'll post what I find as I go.

        EDIT:
        I see how you use a button to increment the "wantedtemperature" variable by one. I'm looking to declare a boolean variable in <logic><all_variables> and set it's value to change it's state from off to on and back, and affect it with the "change variable" function property of a button.

        Do I have to specify somehow that the variable is the boolean type?
        Do I put "on" in the vote opinion field?
        How does that work?

        More plainly put, "How do I toggle a boolean variable with the state of a button?"
        Gotta love C# generics.
        Variables are "objects" it doesnt really care if you store a string a boolean a double a monkey. It just tries to increment, or decrement it. If it fails, it skips it. Al least in theory. I will get some sample code for a boolean value to be changed around.

        Originally posted by h3rk View Post
        EDIT: Looks like button sizes have changed, given the same images, and x,y size declaration as I used in ver2. I'm not sure why, but it looks like I have to resize them again to fit.
        Not sure what you mean here... Do you mean you have a large image for a small button and the button resizes to the image instead of the image resizing to the button?
        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

        Comment


        • #5
          As it turned out the sizes were right but everything appeared lower by about 16 pixels in the new program. Maybe it was your secret debug button. But ended up being a relatively easy fix.


          EDIT:
          And the size dimensions crop, rather than resize, the buttons still. No biggie, it's how it was before, there's pro's and con's to that, and they pretty much balance out.

          I meant that the button seemed to take up more real estate on the 640,480 background than it used to, but I needed glasses appearantly.

          Eagerly awaiting the boolean example.
          It's been a while...

          Comment


          • #6
            Originally posted by h3rk View Post
            As it turned out the sizes were right but everything appeared lower by about 16 pixels in the new program. Maybe it was your secret debug button. But ended up being a relatively easy fix.


            EDIT:
            And the size dimensions crop, rather than resize, the buttons still. No biggie, it's how it was before, there's pro's and con's to that, and they pretty much balance out.

            I meant that the button seemed to take up more real estate on the 640,480 background than it used to, but I needed glasses appearantly.

            Eagerly awaiting the boolean example.
            I can make it an option to stretch or crop no problem. Ill make note of it.

            Also I will be (at the suggestion of Matt) making each button or display property have multiple page values. So the same item can be on multiple pages.

            Ill get that bool example out lickitty split!
            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

            Comment


            • #7
              when directly incrementing a variable by some amount with a button. There seems to be nothing preventing run-time usage from incrementing the value above the expected range. Lets say were affecting a graph with a variable x from 0-12. We initialize the variable at 0, and then by pushing a button, we x++. Pushing it 20 times we are specifying 20V and then to get back in range we have to push the button 8 times. Is that corrected in the back end, or do we add an expression in the logic, like:
              if x>=12 then x=12 and if x<=0 then x=0.
              It's been a while...

              Comment


              • #8
                yes you do that in the logic.

                You see because anything that changes a variable is executed immediately before evaluating all the if/then sections. If you press a button 100 times before that logic statement comes, the variable remains at x. Then it evaluates all the votes and says "i need to go to x + 100" and it sets the variable at x + 100. Then immediately afterwards (no i/o call can be made in this period), the logic happens. So then you can do if greater than whatever, make it whatever else. Then it will continue on with the i/o afterwards. So with your example there will be a nanosecond time internally in the program where the variable goes to 20, but then in the next logic statement you set it to 12 if over, so by the time the i/o timers fire, the variable has to 100% be in that range.

                Make sense?
                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

                Comment


                • #9
                  Originally posted by 2k1Toaster View Post
                  yes you do that in the logic.

                  You see because anything that changes a variable is executed immediately before evaluating all the if/then sections. If you press a button 100 times before that logic statement comes, the variable remains at x. Then it evaluates all the votes and says "i need to go to x + 100" and it sets the variable at x + 100. Then immediately afterwards (no i/o call can be made in this period), the logic happens. So then you can do if greater than whatever, make it whatever else. Then it will continue on with the i/o afterwards. So with your example there will be a nanosecond time internally in the program where the variable goes to 20, but then in the next logic statement you set it to 12 if over, so by the time the i/o timers fire, the variable has to 100% be in that range.

                  Make sense?

                  Yes, and the voting thing will just take some getting used to. Doesn't seem too tough though.

                  And I would like the option to 'stretch' an image. Appearantly it did that before, automatically, with the analog input multiimage, on the last version.
                  It's been a while...

                  Comment


                  • #10
                    Ok, with the boolean variable, the only thing that needs changing is the "vote_opinion" attribute.

                    Here is the actual evaluation code:
                    Code:
                    #region Change Variable
                    case "change variable":
                        for (int checkVariable_i = 0; checkVariable_i < AllVariables.Count; checkVariable_i++)
                        {
                            if (AllVariables[checkVariable_i].variableReferenceName == findButton.functionTarget)
                            {
                                object changeto = AllVariables[checkVariable_i].variableValue;
                                if (findButton.voteOpinion.StartsWith("+") || findButton.voteOpinion.StartsWith("-"))
                                {
                                    double dChange = 0.0;
                                    double.TryParse(findButton.voteOpinion, out dChange);
                                    changeto = (object)((double)changeto + dChange);
                                }
                                else if (findButton.voteOpinion.Equals("true"))
                                {
                                    changeto = (object) true;
                                }
                                else if (findButton.voteOpinion.Equals("false"))
                                {
                                    changeto = (object)false;
                                }
                                else
                                {
                                    double tryChangeDouble = 0.0;
                                    if (double.TryParse(findButton.voteOpinion, out tryChangeDouble))
                                    {
                                        changeto = (object)tryChangeDouble;
                                    }
                                }
                    
                                LogicalVote newLV = new LogicalVote();
                                newLV.MyLogicalPriority = findButton.votePriority;
                                newLV.toWhat = (object)changeto;
                                AllVariables[checkVariable_i].WhatShouldMyValueBe.Add(newLV);
                                break;
                            }
                        }
                        break;
                    #endregion
                    So you can see from the code that you can do absolute values such as "80" or "-42" or "true" or "false" as well as incremental such as "+5" or "-12".

                    And since it is all done with objects, you just need to keep track of which is which. It is perfectly ok to assign the variable "wantedtemperature" which we know we want as a double as a boolean. So instead of keeping your car at 72F, you will be trying to keep it at true. So if you do that sort of thing, you will need to keep track of what variable does what. And there is no apparent length to variable names so be as descriptive as you need be.
                    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

                    Comment


                    • #11
                      Wow! This new version seems like it has many new awesome and useful features! I already can't get myself away from it trying to figure out the new skinning and programming.

                      Question: How do code a PAGE button? Also do the "button id"s matter what they are called?

                      Also no matter how you type you button text it always comes out all lower case in the program

                      Comment


                      • #12
                        Originally posted by bratnetwork View Post
                        Wow! This new version seems like it has many new awesome and useful features! I already can't get myself away from it trying to figure out the new skinning and programming.

                        Question: How do code a PAGE button? Also do the "button id"s matter what they are called?
                        comme ca:
                        Code:
                        <button id="IncrementPage" enabled="yes" function="change page" functionTargetID="RequiredFiller" vote_opinion="+1" vote_priority="medium">
                        the voteopinion again can be either a number (like change to page 2) or it can be a change (like go to next page, or go to the 2nd next page). And the pages work in my version that is new as of like 6am, but not the one for download. So right now page buttons do nothing in your version. I will update it again in a few hours after some curried chicken and roti. yummmmmm

                        And the button ID's absolutely have to be unique. If it is not unique, the button will not be added. The only thing it is used for is tying in logic commands to the state of a button rather than an input, as well as internally to decide what button has been clicked.

                        Originally posted by bratnetwork View Post
                        Also no matter how you type you button text it always comes out all lower case in the program
                        Yeah I noticed that too. Easy fix. I made everything convert to lower case so that "functionTargetID" is the same as "functiontargetid" and "FuNcTiOnTaRgEtId". Less typos due to case.



                        Also for future reference, I dont get an email when you edit a post. I only get one when you make a new post. So if you are editing your post to add more info, do the post whore thing and make a new post so I get an email. Thanks.
                        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

                        Comment


                        • #13
                          Originally posted by 2k1Toaster View Post
                          comme ca:
                          Code:
                          <button id="IncrementPage" enabled="yes" function="change page" functionTargetID="RequiredFiller" vote_opinion="+1" vote_priority="medium">
                          I saw what you posted in comments/suggestions, and I agree with you on the code tags!

                          Originally posted by 2k1Toaster View Post
                          Yeah I noticed that too. Easy fix. I made everything convert to lower case so that "functionTargetID" is the same as "functiontargetid" and "FuNcTiOnTaRgEtId". Less typos due to case.
                          Just keep us updated on what will end up being case-sensative and what will not please.

                          Originally posted by 2k1Toaster View Post
                          Also for future reference, I dont get an email when you edit a post. I only get one when you make a new post. So if you are editing your post to add more info, do the post whore thing and make a new post so I get an email. Thanks.
                          Post-whore it is then...


                          Can you explain the following section of code from the beginning of your <all statements> section?

                          I'm not sure I'm getting it fully.

                          Code:
                          <if priority="medium" fire_on="logic">
                             <parameter1>
                                <variable do="set" name="is5greaterthan3">
                                   <if>
                                      <parameter1>
                                         <number>5</number>
                                      </parameter1>
                                      <test check="greater than or equal to"></test>
                                      <parameter2>
                                         <number>3</number>
                                      </parameter2>
                                   </if>
                                </variable>
                             </parameter1>
                             <test check="NAND"></test>
                                <parameter2>
                                   <boolean_operation type="NOT">
                                      <parameter1>
                                         <boolean_operation type="OR">
                                            <parameter1>
                                               <variable do="get">is5greaterthan3</variable>
                                            </parameter1>
                                            <parameter2>
                                               <boolean>false</boolean>
                                            </parameter2>
                                         </boolean_operation>
                                      </parameter1>
                                   </boolean_operation>
                                </parameter2>
                          </if>
                          It's been a while...

                          Comment


                          • #14
                            Ok newest version with Text that is any case, and then the page buttons work along with an update in the sample file. A single button can be on multiple pages by just adding another page attribute somewhere in the button.

                            Link to newest download:
                            RAR: http://www.fusioncontrolcentre.com/T...er20071122.rar
                            ZIP: http://www.fusioncontrolcentre.com/T...er20071122.zip
                            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

                            Comment


                            • #15
                              Originally posted by h3rk View Post
                              Just keep us updated on what will end up being case-sensative and what will not please.
                              Nothing is case sensitive at all right now. Every tag name and attribute is converted to lowercase before parsing what it is. So no matter how you type it comes out all lower case. I removed the lower case conversion for the text so it wont do that for the textprimary, textsecondary, and textdisabled.

                              Originally posted by h3rk View Post
                              Can you explain the following section of code from the beginning of your <all statements> section?

                              I'm not sure I'm getting it fully.

                              Code:
                              <if priority="medium" fire_on="logic">
                                 <parameter1>
                                    <variable do="set" name="is5greaterthan3">
                                       <if>
                                          <parameter1>
                                             <number>5</number>
                                          </parameter1>
                                          <test check="greater than or equal to"></test>
                                          <parameter2>
                                             <number>3</number>
                                          </parameter2>
                                       </if>
                                    </variable>
                                 </parameter1>
                                 <test check="NAND"></test>
                                    <parameter2>
                                       <boolean_operation type="NOT">
                                          <parameter1>
                                             <boolean_operation type="OR">
                                                <parameter1>
                                                   <variable do="get">is5greaterthan3</variable>
                                                </parameter1>
                                                <parameter2>
                                                   <boolean>false</boolean>
                                                </parameter2>
                                             </boolean_operation>
                                          </parameter1>
                                       </boolean_operation>
                                    </parameter2>
                              </if>
                              ok it is a big if statement. That entire thing needs to evaluate to true before what will be in the "then" area is evaluated. As of right now, nothing is in the "then" area.

                              So here is the equivalence:
                              Code:
                                       <if>
                                          <parameter1>
                                             <number>5</number>
                                          </parameter1>
                                          <test check="greater than or equal to"></test>
                                          <parameter2>
                                             <number>3</number>
                                          </parameter2>
                                       </if>
                              if(5 >= 3) which obviously evaluates to true, but was done for testing not actual use! Then

                              Code:
                              <variable do="set" name="is5greaterthan3">
                                 ...
                              </variable>
                              Takes whatever inside of it and stores it as a variable with name of "is5greaterthan3". If the variable exists, it will override the current value. If the variable does not exist, it will create it. So in this case the variable "is5greaterthan3" is "true".

                              Code:
                              <boolean_operation type="OR">
                                                <parameter1>
                                                   <variable do="get">is5greaterthan3</variable>
                                                </parameter1>
                                                <parameter2>
                                                   <boolean>false</boolean>
                                                </parameter2>
                                             </boolean_operation>
                              this makes the operation "true OR false" because is5greaterthan3 is true and then false is obviously "false". The type is OR which is a logic inclusive OR. Meaning if any input is true, then the output is true. So that expression with "true OR false" evaluates to true.

                              Then the big all encasing if says "true NAND true" and the outcome of that is of a medium priority. And there are 4 timers remember, the gui, input, output, and logic. So when the logic timer fires, this if statement is evaluated. If fire_on was "gui" for isntance, then when the logic timer ticks, it would ignore this entire if/then completely.
                              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

                              Comment

                              Working...
                              X