Page 1 of 32 1234567891011 ... LastLast
Results 1 to 10 of 313

Thread: Fusion Control Centre Uber Edition -- Need Testers

  1. #1
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049

    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. #2
    Super Moderator. If my typing sucks it's probably because I'm driving.... turbocad6's Avatar
    Join Date
    Oct 2004
    Location
    NY
    Posts
    6,234
    dl'd it, I'll try to check it out this weekend

  3. #3
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    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.

  4. #4
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote 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.

    Quote 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

  5. #5
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    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.

  6. #6
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote 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

  7. #7
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    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.

  8. #8
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    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

  9. #9
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Quote 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.

  10. #10
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    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

Page 1 of 32 1234567891011 ... LastLast

Similar Threads

  1. *NEW* USB Input/Output Board -- Fusion Brain
    By 2k1Toaster in forum Fusion Brain
    Replies: 1123
    Last Post: 02-22-2010, 03:33 AM
  2. Need wiring help for 2005 Grand Prix.
    By derekmac in forum Car Audio
    Replies: 33
    Last Post: 09-21-2007, 10:42 PM
  3. Remote Control Fusion Brain.
    By alexgray104 in forum Fusion Brain
    Replies: 9
    Last Post: 09-06-2007, 04:16 AM
  4. Replies: 2
    Last Post: 07-24-2007, 10:11 AM
  5. Replies: 1
    Last Post: 12-03-2005, 09:58 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
  •