Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: Where do I even start??

  1. #21
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    Fusion Control Centre -- FuseGL {1.1.0.471}
    Trace Output File
    ===============================

    In that folder I have a few items and folders...

    Config (folder)
    FB Details (folder)
    images (folder)
    Logic (folder)
    FuseGL.exe
    FuseGL_AutoUpdater_Log.txt
    FuseGL Trace.txt

  2. #22
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by jjohnston View Post
    Fusion Control Centre -- FuseGL {1.1.0.471}
    Trace Output File
    ===============================

    In that folder I have a few items and folders...

    Config (folder)
    FB Details (folder)
    images (folder)
    Logic (folder)
    FuseGL.exe
    FuseGL_AutoUpdater_Log.txt
    FuseGL Trace.txt
    The version is good, and the files are good. I am reuploading the update. Maybe the update didn't get pushed properly. Testing it on my end in a clean folder, it works.
    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

  3. #23
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    That newest update seems to be working for me.

  4. #24
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Ok great. Do you see the big ugly white box and can you can cycle through?
    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. #25
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    Yep, and it cycles through as I click, and I can see the LEDs change with the new output. Now I'm trying to figure out how to edit this to make it simply monitor the digital port, and if port 0,0 is on display LowOn image, and if its off display LowOff, then for port 0,1 it would be MediumLowOn etc. I added those speeds in the section under Setup FanSpeed textures and ports but I think that just broke it. lol

    In my setup I have each fan speed as a seperate button, and I have 1 button set to turn it all off. if that makes sense.

  6. #26
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by jjohnston View Post
    Yep, and it cycles through as I click, and I can see the LEDs change with the new output. Now I'm trying to figure out how to edit this to make it simply monitor the digital port, and if port 0,0 is on display LowOn image, and if its off display LowOff, then for port 0,1 it would be MediumLowOn etc. I added those speeds in the section under Setup FanSpeed textures and ports but I think that just broke it. lol

    In my setup I have each fan speed as a seperate button, and I have 1 button set to turn it all off. if that makes sense.
    Just think it through. Adding to the Fan Speed enumeration is a great idea. But if you have 7 speeds and 7 buttons, you will need 7 FGLO inputs. I would tie all of the click events to a single method. Then have one spot with all your logic. It is the least efficient way of doing things, but conceptually the simplest. Instead of having one response for everybutton, you have 1 response for all the buttons.
    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. #27
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    Yeah, I think I have it added in 3 areas, I'll post my code below. Not sure if my error is in here somewhere, or in the xml file.




    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using FB_USB_2011;
    using FuseGL.GUI;

    namespace HVAC_Example
    {
    public class HVAC_Example
    {
    public enum FanSpeed
    {
    OFF,
    LOWON,
    LOWOFF,
    MEDIUMLOWON,
    MEDIUMLOWOFF,
    MEDIUMHIGHON,
    MEDIUMHIGHOFF,
    HIGHON,
    HIGHOFF
    }

    internal class MyInternalHVAC_FanSpeed_Class
    {
    public FB_Monitor.DigitalOutputPort DigitalOutputPort;
    public FuseGL.GUI.FGLO_Texture FGLO_Texture;

    public MyInternalHVAC_FanSpeed_Class(FB_Monitor.DigitalOu tputPort digitalOutputPort, FGLO_Texture fgloTexture)
    {
    DigitalOutputPort = digitalOutputPort;
    FGLO_Texture = fgloTexture;
    }
    }

    internal Dictionary<FanSpeed, MyInternalHVAC_FanSpeed_Class> FanSpeedLookupDictionary = new Dictionary<FanSpeed,MyInternalHVAC_FanSpeed_Class> ();
    internal FanSpeed currentFanSpeed = FanSpeed.OFF;

    public void setup_HVAC(
    FuseGL.GUI.FuseGL_Object displayFuseGL_Object_for_fan_speed,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_off,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_lowoff,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_lowon,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumlowoff,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumlowon,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumhighoff,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumhighon,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_highoff,
    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_highon
    )
    {
    // Setup FanSpeed textures and ports
    FanSpeedLookupDictionary.Add(FanSpeed.OFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_off, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _OFF", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/Off.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.LOWOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_lowoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _LOWOFF", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/LowOff.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.LOWON, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_lowon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _LOWON", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/LowOn.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMLOWOFF , new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_mediumlowoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _MEDIUMLOWOFF", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/MediumLowOff.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMLOWON, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_mediumlowon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _MEDIUMLOWON", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/MediumLowon.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMHIGHOF F, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_mediumhighoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _MEDIUMHIGHOFF", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/MediumHighOff.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMHIGHON , new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_mediumhighon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _MEDIUMHIGHON", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/MediumHighON.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.HIGHOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_highoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _HIGHOFF", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/HighOff.png")));
    FanSpeedLookupDictionary.Add(FanSpeed.HIGHOn, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_f or_fan_highon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExt ernalImagePath("HVAC_Fan_Control___FanSpeedImage__ _HIGHON", "http://www.mp3car.com/vbulletin/images/HVAC/FanSpeed/HighOn.png")));

    // Hook into when the FGLO is pressed
    displayFuseGL_Object_for_fan_speed.MouseEvent___Cl ickDown += new FuseGL_Object.FuseGL_FGLO_MouseEvent(ChangeHVAC_Fa nSpeed_Button_Was_Pressed);

    // Change the image to something known to begin with
    ChangeFanSpeed(currentFanSpeed, displayFuseGL_Object_for_fan_speed);
    }

    void ChangeHVAC_FanSpeed_Button_Was_Pressed(object sender, FuseGL.FuseGL_GUI.MouseEventInformation MouseInfo)
    {
    switch(currentFanSpeed)
    {
    case FanSpeed.OFF:
    currentFanSpeed = FanSpeed.LOW;
    break;
    case FanSpeed.LOW:
    currentFanSpeed = FanSpeed.MEDIUM;
    break;
    case FanSpeed.MEDIUM:
    currentFanSpeed = FanSpeed.HIGH;
    break;
    case FanSpeed.HIGH:
    currentFanSpeed = FanSpeed.OFF;
    break;
    }

    ChangeFanSpeed(currentFanSpeed, (FuseGL.GUI.FuseGL_Object)sender);
    }

    public void ChangeFanSpeed(FanSpeed _speed, FuseGL.GUI.FuseGL_Object fanSpeedFGLO = null)
    {
    // Put some info in the trace for debugging perhaps?
    FuseGL.FuseGL_Debugger.Trace.Add("Changing Fan Speed to: " + _speed);

    // First turn off all the outputs
    foreach(KeyValuePair<FanSpeed, MyInternalHVAC_FanSpeed_Class> aFanSpeed in FanSpeedLookupDictionary)
    {
    aFanSpeed.Value.DigitalOutputPort.Value = FB_Monitor.DigitalOutputPort.DIGITAL_OUTPUT_OFF;
    }

    // Then if it is a valid fan speed and the dictionary has been setup properly...
    if(FanSpeedLookupDictionary.ContainsKey(_speed))
    {
    // Turn that output on
    FanSpeedLookupDictionary[_speed].DigitalOutputPort.Value = FB_Monitor.DigitalOutputPort.DIGITAL_OUTPUT_ON;

    // If the FGLO to display a picture in is valid...
    if (fanSpeedFGLO != null)
    {
    // Change the texture to the correct one depicting the new fan speed
    fanSpeedFGLO.TextureIsBeingOverriddenAndControlled Externally = true;
    fanSpeedFGLO.TextureToOverrideWith = FanSpeedLookupDictionary[_speed].FGLO_Texture;
    }
    }
    return;
    }
    }
    }
    Last edited by jjohnston; 01-31-2013 at 09:49 PM.

  8. #28
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    Um, not sure why it put the web address in for my image location, but its not pulling internet pics.

  9. #29
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Can you post the cs file or put them in [ code ] tags. It is hard to read. You need to upload your images to a web hosting site like this: http://image-host.us/

    The post the image in [ img ] tags.
    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. #30
    Low Bitrate
    Join Date
    Jul 2007
    Posts
    65
    Oh ok. Below are the images. and the code. the very bottom image is the overall look of my layout as a whole. I thought maybe you could get an idea of what I'm trying to do with that. Thanks for all your help! this is all very new to me, but I do want to learn how to do it.










    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using FB_USB_2011;
    using FuseGL.GUI;
    
    namespace HVAC_Example
    {
        public class HVAC_Example
        {
            public enum FanSpeed
            {
                OFF,
                LOWON,
                LOWOFF,
                MEDIUMLOWON,
                MEDIUMLOWOFF,
                MEDIUMHIGHON,
                MEDIUMHIGHOFF,
                HIGHON,
                HIGHOFF
            }
    
            internal class MyInternalHVAC_FanSpeed_Class
            {
                public FB_Monitor.DigitalOutputPort DigitalOutputPort;
                public FuseGL.GUI.FGLO_Texture FGLO_Texture;
    
                public MyInternalHVAC_FanSpeed_Class(FB_Monitor.DigitalOutputPort digitalOutputPort, FGLO_Texture fgloTexture)
                {
                    DigitalOutputPort = digitalOutputPort;
                    FGLO_Texture = fgloTexture;
                }
            }
    
            internal Dictionary<FanSpeed, MyInternalHVAC_FanSpeed_Class> FanSpeedLookupDictionary = new Dictionary<FanSpeed,MyInternalHVAC_FanSpeed_Class>();
            internal FanSpeed currentFanSpeed = FanSpeed.OFF;
    
            public void setup_HVAC(
                                    FuseGL.GUI.FuseGL_Object displayFuseGL_Object_for_fan_speed,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_off,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_lowoff,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_lowon,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumlowoff,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumlowon,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumhighoff,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_mediumhighon,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_highoff,
                                    FB_Monitor.DigitalOutputPort _digitalOutputPort_for_fan_highon
                                  )
            {
                // Setup FanSpeed textures and ports
                FanSpeedLookupDictionary.Add(FanSpeed.OFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_off, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___OFF", "images/HVAC/FanSpeed/Off.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.LOWOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_lowoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___LOWOFF", "images/HVAC/FanSpeed/LowOff.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.LOWON, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_lowon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___LOWON", "images/HVAC/FanSpeed/LowOn.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMLOWOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_mediumlowoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___MEDIUMLOWOFF", "images/HVAC/FanSpeed/MediumLowOff.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMLOWON, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_mediumlowon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___MEDIUMLOWON", "images/HVAC/FanSpeed/MediumLowon.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMHIGHOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_mediumhighoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___MEDIUMHIGHOFF", "images/HVAC/FanSpeed/MediumHighOff.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.MEDIUMHIGHON, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_mediumhighon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___MEDIUMHIGHON", "images/HVAC/FanSpeed/MediumHighON.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.HIGHOFF, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_highoff, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___HIGHOFF", "images/HVAC/FanSpeed/HighOff.png")));
                FanSpeedLookupDictionary.Add(FanSpeed.HIGHOn, new MyInternalHVAC_FanSpeed_Class(_digitalOutputPort_for_fan_highon, FGLO_Texture.MakeQuickFGLOTexture___ConvertFromExternalImagePath("HVAC_Fan_Control___FanSpeedImage___HIGHON", "images/HVAC/FanSpeed/HighOn.png")));
    
                // Hook into when the FGLO is pressed
                displayFuseGL_Object_for_fan_speed.MouseEvent___ClickDown += new FuseGL_Object.FuseGL_FGLO_MouseEvent(ChangeHVAC_FanSpeed_Button_Was_Pressed);
    
                // Change the image to something known to begin with
                ChangeFanSpeed(currentFanSpeed, displayFuseGL_Object_for_fan_speed);
            }
    
            void  ChangeHVAC_FanSpeed_Button_Was_Pressed(object sender, FuseGL.FuseGL_GUI.MouseEventInformation MouseInfo)
            {
                switch(currentFanSpeed)
                {
                    case FanSpeed.LOWOFF:
                        currentFanSpeed = FanSpeed.LOWON;
                        break;
                    
                }
    
                ChangeFanSpeed(currentFanSpeed, (FuseGL.GUI.FuseGL_Object)sender);
            }
    
            public void ChangeFanSpeed(FanSpeed _speed, FuseGL.GUI.FuseGL_Object fanSpeedFGLO = null)
            {
                // Put some info in the trace for debugging perhaps?
                FuseGL.FuseGL_Debugger.Trace.Add("Changing Fan Speed to: " + _speed);
    
                // First turn off all the outputs
                foreach(KeyValuePair<FanSpeed, MyInternalHVAC_FanSpeed_Class> aFanSpeed in FanSpeedLookupDictionary)
                {
                    aFanSpeed.Value.DigitalOutputPort.Value = FB_Monitor.DigitalOutputPort.DIGITAL_OUTPUT_OFF;
                }
    
                // Then if it is a valid fan speed and the dictionary has been setup properly...
                if(FanSpeedLookupDictionary.ContainsKey(_speed))
                {
                    // Turn that output on
                    FanSpeedLookupDictionary[_speed].DigitalOutputPort.Value = FB_Monitor.DigitalOutputPort.DIGITAL_OUTPUT_ON;
    
                    // If the FGLO to display a picture in is valid...
                    if (fanSpeedFGLO != null)
                    {
                        // Change the texture to the correct one depicting the new fan speed
                        fanSpeedFGLO.TextureIsBeingOverriddenAndControlledExternally = true;
                        fanSpeedFGLO.TextureToOverrideWith = FanSpeedLookupDictionary[_speed].FGLO_Texture;
                    }
                }
                return;
            }
        }
    }

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. start with oem bezel or start from scratc
    By slociviccoupe in forum Fabrication
    Replies: 4
    Last Post: 04-08-2012, 01:01 AM
  2. start with oem ezel or start from scratc
    By slociviccoupe in forum Fabrication
    Replies: 0
    Last Post: 04-01-2012, 10:54 PM
  3. Remote Start Fried? Car continously tries to start
    By Phatsacks in forum General Hardware Discussion
    Replies: 4
    Last Post: 08-17-2008, 05:39 PM
  4. Replies: 1
    Last Post: 10-23-2006, 09:44 PM
  5. Where to start...
    By Rosebud6 in forum Road Runner
    Replies: 5
    Last Post: 12-09-2005, 03:02 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
  •