Page 13 of 33 FirstFirst ... 34567891011121314151617181920212223 ... LastLast
Results 121 to 130 of 328

Thread: Fusion Brain Version 6 -- Beta Testing

  1. #121
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    I'm updating now. Only security updates for .NET though, nothing big. I have 1.1,2s p2, 3 sp2, 3.5 SPI, 4 Client, 4 Extended, 4 multi-targeting pack.

    If I take the gui stuff out:
    Code:
    <FuseGL_GUI_Settings>
        <setting type="size" name="gui_size" width="274" height="600" />
        <setting type="int" gui_border_thickness="1" />
        <setting type="colour" gui_border_colour="85,85,85" />
    </FuseGL_GUI_Settings>
    it works fine.

    Even having the <FuseGL_GUI_Settings> </FuseGL_GUI_Settings> stops it from running.

    Graphics aside (as it's NOT terribly important), do you have an example of logic with analog inputs?
    Last edited by rEegLer; 08-09-2011 at 12:20 PM.
    Love

  2. #122
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Updated and still nothing.
    Love

  3. #123
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Sorry been crazy busy. Here is a quick code sample:

    Code:
    using System;
    using System.Collections.Generic;
    using FB_USB_2011;
    using FuseGL.GUI.Text;
    using FuseGL.Logic;
    
    namespace FuseGL_SomeNamespace
    {
        class SomeClass
        {
            public object SetupAnalogueInputToDoSomething(FB_Monitor.AnalogueInputPort _port)
            {
                _port.AnalogueInputDataReceivedEvent += new FB_Monitor.AnalogueInputPort.AnalogueInputDataReceived(doSomethingEvent);
                return null;
            }
    
            void doSomethingEvent(FB_Monitor.AnalogueInputPort _port)
            {
                if(_port.Port == 0)
                {
                    if(_port.Value < 1.0)
                    {
                        // Do Something
                    }
                    else if (1.0 < _port.Value && _port.Value < 2.0)
                    {
                        // Do Something Else
                    }
                    else if (2.0 < _port.Value && _port.Value < 3.0)
                    {
                        // Do Something Else
                    }
                    else if (3.0 < _port.Value && _port.Value <= 3.3)
                    {
                        // Do Something Else
                    }
                }
            }
        }
    }
    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. #124
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Awesome. Thanks.
    Love

  5. #125
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    And the config file would look like this?:

    Code:
    <FuseGL_User_Settings>
      ....
      <Startup_Events>
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="Logic.cs;FuseGL_Logic.CarPC;doSomethingEvent;{FB.AnalogueInput(0.0)};"/>
        </events>
      </Startup_Events>
      ...
    </FuseGL_User_Settings>
    That doesn't work for me.



    Also, is startup events where you place code for things that you want to be default on?
    Last edited by rEegLer; 08-12-2011 at 05:18 PM.

  6. #126
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by rEegLer View Post
    And the config file would look like this?:

    Code:
    <FuseGL_User_Settings>
      ....
      <Startup_Events>
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="Logic.cs;FuseGL_Logic.CarPC;doSomethingEvent;{FB.AnalogueInput(0.0)};"/>
        </events>
      </Startup_Events>
      ...
    </FuseGL_User_Settings>
    That doesn't work for me.
    Yes assuming you saved the file as Logic.cs in your root directory and changed the name of the namespace and class. By doesn't work do you mean crash? If so then I need a trace file and I also need to know which version you are running since you seem to experience things that have been addressed in updates some time ago. The code I posted doesn't actually do anything, it just captures the port values so you can do something with them. So you can put whatever you want in there.

    Also, is startup events where you place code for things that you want to be default on?
    It is where you place things you want to have happen on startup. So when the program starts, it runs that piece of code once. That code sets up an event that then continues to fire as long as that FB analogue input is updated.
    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. #127
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    Quote Originally Posted by 2k1Toaster View Post
    Yes assuming you saved the file as Logic.cs in your root directory and changed the name of the namespace and class.
    Yup, I changed the file name and namespace/class.

    By doesn't work do you mean crash? If so then I need a trace file and I also need to know which version you are running since you seem to experience things that have been addressed in updates some time ago.
    I attached the trace file. It shows it doing something with the event (I did a search for Logic.cs). FuseGL is version 1.1.0.172 (Alpha Release-2011-06-18 w/update installed). I have firmware 1.3A (from May 21, 2011).

    All the GUI settings I try to put in the config file still don't work. It just crashes.

    The code I posted doesn't actually do anything, it just captures the port values so you can do something with them. So you can put whatever you want in there.
    Right. Here's what I put:

    Code:
    using System;
    using System.Collections.Generic;
    using FB_USB_2011;
    using FuseGL.GUI.Text;
    using FuseGL.Logic;
    
    namespace FuseGL_Logic
    {
        class CarPC
        {
            public object SetupAnalogueInputToDoSomething(FB_Monitor.AnalogueInputPort _port)
            {
                _port.AnalogueInputDataReceivedEvent += new FB_Monitor.AnalogueInputPort.AnalogueInputDataReceived(doSomethingEvent);
                return null;
            }
    
            public void doSomethingEvent(FB_Monitor.AnalogueInputPort _port)
            {
                if (_port.Port == 1)
                {
                    if (_port.Value < 1.0)
                    {
                        SendKeys.Send("A");
                    }
                    else if (1.0 < _port.Value && _port.Value < 2.0)
                    {
                        SendKeys.Send("B");
                    }
                    else if (2.0 < _port.Value && _port.Value < 3.0)
                    {
                        SendKeys.Send("C");
                    }
                    else if (3.0 < _port.Value && _port.Value <= 3.3)
                    {
                        SendKeys.Send("D");
                    }
                }
            }
        }
    }

    It is where you place things you want to have happen on startup. So when the program starts, it runs that piece of code once. That code sets up an event that then continues to fire as long as that FB analogue input is updated.
    Here is what I have under Startup Events:

    Code:
      <Startup_Events>
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="Logic.cs;FuseGL_Logic.CarPC;doSomethingEvent;{FB.AnalogueInput(0.4)};"/>
          <startup action="FB.ToggleDigitalOutput" inputArgs="Port:0.10" />
        </events>
      </Startup_Events>
    It doesn't do any of the startup events, DO10 doesn't turn on nor logic compiler.

    Also, I think I mentioned this before but it will not allow me to have more then one digital output initialized at the same time.

    I hope it's just something simple on my end.
    Attached Files Attached Files
    Love

  8. #128
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Could you also post/attach/email your entire XML config file? That way I can just try the whole thing.
    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. #129
    Variable Bitrate rEegLer's Avatar
    Join Date
    Jul 2008
    Location
    Mechanicsburg, PA
    Posts
    266
    I posted it a couple posts earlier but here it is:

    Code:
    ?xml version="1.0" encoding="utf-8"?>
    <FuseGL_User_Settings>
      <FuseGL_GUI_Settings>
        <setting type="size" name="gui_size" width="274" height="600" />
        <setting type="int" gui_border_thickness="1" />
        <setting type="colour" gui_border_colour="85,85,85" />
      </FuseGL_GUI_Settings>
      <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - LBL - Show Thing:Raw Analogue Input[0,0]" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <text text="Unknown State" />
        <size width="200" height="50" />
        <location x="300" y="50" z="0" alignment="L" />
        <setting type="int" border_size="1" />
        <setting type="bool" mouse_cursor_to_hand_on_hover="false" />
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="UpdateLabelText.cs;FuseGL_TextManipulation.InternalFlyCompile_UpdateLabelText;ChangeButtonTextOnAnalogueInputPersistant;{FB.AnalogueInput(0.0)};{this.text};0.000;" outputTo="this.text.text" />
        </events>
      </User_Object>
      <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - LBL - Show Thing:Raw Analogue Input[0,1]" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <text text="Unknown State" />
        <size width="200" height="50" />
        <location x="300" y="100" z="0" alignment="L" />
        <setting type="int" border_size="1" />
        <setting type="bool" mouse_cursor_to_hand_on_hover="false" />
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="UpdateLabelText.cs;FuseGL_TextManipulation.InternalFlyCompile_UpdateLabelText;ChangeButtonTextOnAnalogueInputPersistant;{FB.AnalogueInput(0.1)};{this.text};0.000;" outputTo="this.text.text" />
        </events>
      </User_Object>
      <User_Object type="FuseGL_Object">
        <setting type="string" name="GL - LBL - Show Thing:Raw Analogue Input[0,2]" />
        <image location="internal" path="FuseGL.Configurator.Configurator_IMG_Resources.UserButtonBackground" />
        <text text="Unknown State" />
        <size width="200" height="50" />
        <location x="300" y="150" z="0" alignment="L" />
        <setting type="int" border_size="1" />
        <setting type="bool" mouse_cursor_to_hand_on_hover="true" />
        <events>
          <startup action="FuseGL.ExecuteCode" inputArgs="UpdateLabelText.cs;FuseGL_TextManipulation.InternalFlyCompile_UpdateLabelText;ChangeButtonTextOnAnalogueInputPersistant;{FB.AnalogueInput(0.2)};{this.text};0.000;" outputTo="this.text.text" />
        </events>
      </User_Object>
    </FuseGL_User_Settings>
    nothing out of the ordinary, it's just when I put the <FuseGL_GUI_Settings> tag anywhere in the XML file.
    Love

  10. #130
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Try this exe: http://www.fusioncontrolcentre.com/F...ate.2011.08.16

    Rename it to *.zip. Then unarchive it and see what happens. This is the version I am using. I just want to be sure they are similar.
    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

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
  •