Page 11 of 33 FirstFirst ... 23456789101112131415161718192021 ... LastLast
Results 101 to 110 of 328

Thread: Fusion Brain Version 6 -- Beta Testing

  1. #101
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by rEegLer View Post
    Problems I'm having after update:

    - If I try to create a temp sensor, degrees F does not work but Celsius does. When I create the Celsius sensor, are there suppose to be titles for each dialog that pops up? It gives me a numeric OSK but I don't know what it wants. Also if I click OK while nothing is entered it crashes.
    I will look into the Fahrenheit problem. There are no dialogues to popup yet, those are to be added. The numeric OSK is usually FB->Input or Output Index then the alphabetical OSK is the name. Click OK on the OSK with no value entered you mean?

    - If I try to create a variable, the next dialog that pops up is just a "go-back" button and when clicks is just exits out.
    Yep, because I am still scratching my head on how to implement that... It's a thinker. I wasn't wanting to release this version yet but it fixed a worse bug so it is out now.

    - It also crashes on me when I right-click during configure mode
    That's known and already fixed, thankyou.

    Looking forward to logic!
    Logic configuration via the GUI is coming. However logic is doable right now. The cool bit about FuseGL is that it actually compiles code from external files and uses it within. So that means you can make a small *.cs file using C# code (or VB.NET I believe, but I have not tested that) to do anything you want that is legal in all of .NET 4.0 which is a bunch of stuff.
    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. #102
    Variable Bitrate
    Join Date
    Feb 2002
    Posts
    411
    Thank you for the example! I was trying to figure out how to that but I didn't know what the instruction would be. Can you help me with two other little examples? How can I make a button that raises or lowers that value? Also, can one mousedown event control multiple outputs yet ?

    Is the a sample code repository available, or a list of instructions I can use in the XML code ?
    Old School MP3CAR.com member!

  3. #103
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by dscustoms View Post
    Thank you for the example! I was trying to figure out how to that but I didn't know what the instruction would be. Can you help me with two other little examples? How can I make a button that raises or lowers that value? Also, can one mousedown event control multiple outputs yet ?

    Is the a sample code repository available, or a list of instructions I can use in the XML code ?

    Sorry, raises or lowers which value?

    You can attach an infinite number of events to any object of any kind. So yes you can do multiple outs already. The sample code is small, however you can make any C# file externally and compilable. So you can write your own even.
    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. #104
    Variable Bitrate
    Join Date
    Feb 2002
    Posts
    411
    The PWM rate.

    Sorry, I'm not much use at code, never really got into it, but I know enough to be able to put together the parts I can learn. For instance, I don't know what all the objects and events I need to use to control the FB are, so it's tough for me to guess how to make things work. Maybe you can point me to a guide on what is possible with the language used in your config file, and whatever commands the fb can respond to?
    Old School MP3CAR.com member!

  5. #105
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Yes you can. I don't have code readily available, for that I will try to remember to do that tonight when I am back at my PC.
    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. #106
    Variable Bitrate
    Join Date
    Feb 2002
    Posts
    411
    Anything you can send me of sample code for this thing, I'm pretty good at figuring out how to do stuff, I'd appreciate it. With a few more parts in place, I'll be able to install this in the Lex and at least have some basic functionality, controlling my dash LEDs and HVAC, which are both ready to be controlled!
    Old School MP3CAR.com member!

  7. #107
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    I'm at the airport waiting for my second delayed flight, but that means I have had some time.

    Ok, so this should work with any version of FuseGL, and this is the power of FuseGL.

    So make a *.cs file called "CustomGooCode.cs" and place it in the *.exe's directory. Put the following code into that file.

    Code:
    using System;
    using System.Collections.Generic;
    using FB_USB_2011;
    using FuseGL.GUI.Text;
    using FuseGL.Logic;
    
    namespace CustomGoo_Namespace
    {
        class YourCustomGooParentClassName
        {
            private int some_global_to_you_variable_maybe = 0;
    
            public object returnSomethingMethod()
            {
                return some_global_to_you_variable_maybe++;
            }
    
            public void DigitalOutputPort___IncreaseValue(FB_Monitor.DigitalOutputPort _port)
            {
                _port.Value++;
            }
        }
    }
    Now in your UserGUIConfig.xml file, put this as one of your button's events:

    Code:
        <events>
          <onMouseDown action="FuseGL.ExecuteCode" inputArgs="CustomGooCode.cs;CustomGoo_Namespace.YourCustomGooParentClassName;DigitalOutputPort___IncreaseValue;{FB.DigitalOutput(0.10)};"/>
        </events>
    And that's it.

    So when you click the button it does the "FuseGL.ExecuteCode" action. This is the main power beef of FuseGL. It will compile your code on the fly, integrate it into the program as a binary and that external code is hooked into everything available in FuseGL from the mouse cursor to raw pixels or all the input/output ports, all events, and even the debug log. Everything...

    So once it knows it is doing that, it looks for the code as a file which we told it is "CustomGooCode.cs". You could make that anything (relative or absolute) and it will work. So "C:\Pants.cs" will work if you named the code file "Pants.cs" and put it on your C: drive. If it does not find the file, it checks an internal cache of code files to see if it is in there (which it won't be so it would then fail).

    It then looks for and compiles the class "YourCustomGooParentClassName" which it looks for in "CustomGoo_Namespace". Again you can probably relate those names to the *.cs file earlier and change them at your whim.

    If everything compiles and hooks in correctly, then it invokes the "DigitalOutputPort___IncreaseValue" method. It passes it in parameters of "FB.DigitalOutput(0.10)". All parameters are in the format of: "{parameter};{parameter2};{parameter3};" if there was a return object, it would go in the outputTo="somewhere" part of the XML file.

    And that function it calls just increments the "Value" of the digital output port you pass in by one each time you click it.
    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

  8. #108
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    I'm at the airport waiting for my second delayed flight, but that means I have had some time.

    Ok, so this should work with any version of FuseGL, and this is the power of FuseGL.

    So make a *.cs file called "CustomGooCode.cs" and place it in the *.exe's directory. Put the following code into that file.

    Code:
    using System;
    using System.Collections.Generic;
    using FB_USB_2011;
    using FuseGL.GUI.Text;
    using FuseGL.Logic;
    
    namespace CustomGoo_Namespace
    {
        class YourCustomGooParentClassName
        {
            private int some_global_to_you_variable_maybe = 0;
    
            public object returnSomethingMethod()
            {
                return some_global_to_you_variable_maybe++;
            }
    
            public void DigitalOutputPort___IncreaseValue(FB_Monitor.DigitalOutputPort _port)
            {
                _port.Value++;
            }
        }
    }
    Now in your UserGUIConfig.xml file, put this as one of your button's events:

    Code:
        <events>
          <onMouseDown action="FuseGL.ExecuteCode" inputArgs="CustomGooCode.cs;CustomGoo_Namespace.YourCustomGooParentClassName;DigitalOutputPort___IncreaseValue;{FB.DigitalOutput(0.10)};"/>
        </events>
    And that's it.

    So when you click the button it does the "FuseGL.ExecuteCode" action. This is the main power beef of FuseGL. It will compile your code on the fly, integrate it into the program as a binary and that external code is hooked into everything available in FuseGL from the mouse cursor to raw pixels or all the input/output ports, all events, and even the debug log. Everything...

    So once it knows it is doing that, it looks for the code as a file which we told it is "CustomGooCode.cs". You could make that anything (relative or absolute) and it will work. So "C:\Pants.cs" will work if you named the code file "Pants.cs" and put it on your C: drive. If it does not find the file, it checks an internal cache of code files to see if it is in there (which it won't be so it would then fail).

    It then looks for and compiles the class "YourCustomGooParentClassName" which it looks for in "CustomGoo_Namespace". Again you can probably relate those names to the *.cs file earlier and change them at your whim.

    If everything compiles and hooks in correctly, then it invokes the "DigitalOutputPort___IncreaseValue" method. It passes it in parameters of "FB.DigitalOutput(0.10)". All parameters are in the format of: "{parameter};{parameter2};{parameter3};" if there was a return object, it would go in the outputTo="somewhere" part of the XML file.

    And that function it calls just increments the "Value" of the digital output port you pass in by one each time you click it.
    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. #109
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Also note that this part:

    Code:
            private int some_global_to_you_variable_maybe = 0;
    
            public object returnSomethingMethod()
            {
                return some_global_to_you_variable_maybe++;
            }
    is just showing how to make a method that returns something all of your own. It is not needed for the PWM value incrementer example.
    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. #110
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Quote Originally Posted by 2k1Toaster View Post
    Also note that this part:

    Code:
            private int some_global_to_you_variable_maybe = 0;
    
            public object returnSomethingMethod()
            {
                return some_global_to_you_variable_maybe++;
            }
    is just showing how to make a method that returns something all of your own. It is not needed for the PWM value incrementer example.
    Thanks for the syntax and example! I know you probably don't like giving solutions to people individual needs when they should figure it out themselves but I'm having trouble figuring out the logic for my steering wheel controls. How do you call an analog input from the FB and then analyze that value and send a keystroke based on in-between statements. I'm not all that familiar with C language so that is mostly the problem.
    Love

Similar Threads

  1. ** NEW Fusion Brain Version 6, Pre-Order NOW **
    By 2k1Toaster in forum Fusion Brain
    Replies: 259
    Last Post: 04-07-2013, 03:48 PM
  2. Fusion Brain version 4
    By MattFreitag in forum Fusion Brain
    Replies: 7
    Last Post: 08-01-2010, 05:32 PM
  3. Fusion Brain -- Digital Encoder Beta Test
    By 2k1Toaster in forum Fusion Brain
    Replies: 52
    Last Post: 09-18-2009, 03:11 PM
  4. Fusion Brain Version 4 Manual
    By greenman100 in forum FB Documentation and Tutorials
    Replies: 0
    Last Post: 12-19-2008, 03:11 PM
  5. Fusion Brain Version 4 ready for Beta Testers!
    By greenman100 in forum Fusion Brain
    Replies: 15
    Last Post: 11-13-2008, 11:21 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
  •