Page 9 of 48 FirstFirst 12345678910111213141516171819 ... LastLast
Results 81 to 90 of 479

Thread: RRFusion- My Fusion Brain plugin for RR

  1. #81
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Quote Originally Posted by mezz64 View Post
    Guess i'm going to have to switch back to trying to embed fusion control centre even though it's a pain to skin.
    I always take suggestions... What is hard about it? What can I change to make it easier?
    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. #82
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,170
    Blog Entries
    52
    Quote Originally Posted by 2k1Toaster View Post
    The first batch did have the timer off when no USB communication happens. So if it is going off when switching screens that means during that time, no USB communication, so it shuts off perhaps. When you made the plugin, what did you set the timer bits to?

    this is the whole function that that handles send/receive. It runs in a .net timer every 2000ms.

    Code:
    Public Shared Function FB_SendReceive()
            'MsgBox("function started")
            For i = 0 To 11
                OutputArray(i) = Convert.ToByte(0 & KeepAliveBit & DigOut(i))
            Next
            'MsgBox("Output array made")
            FUSB_Send(pFusionUSB, OutputArray)
    
            'MsgBox("data sent to fb")
    
            'Now, get the info from the fusion brain
            If (FUSB_Receive(pFusionUSB, InputArray)) Then
                'It retured true, meaning it got data. Process it.
                For i = 0 To 9
                    'The data coming in from the analog inputs is 10 bits long, so it has to come in two bytes.
                    'The first byte contains 8 bits, which are the most significant bits.
                    'The second byte contains only 2 bits, and they are the least significant bits. Personally, I ignore those two.
    
                    'AnalogIn(i) = CInt(InputArray(i * 2 + 12)) 'Uses only the first byte 0-255 (8 bits)
                    'Range of 0-255, so divide by 255 to get a percent, then multiply by 5 to get volts.
                    'AnalogIn(i) = (totalin / 255) * 5
    
                    AnalogIn(i) = (CInt(InputArray(i * 2 + 12)) * 4) + CInt(InputArray(i * 2 + 13) / 64) 'Uses both bytes 0-1023 (10 bits)
                    'Range of 0-1023, so divide by 1023 to get a percent, then multiply by 5 if you want to get volts.
                    'AnalogIn(i) = (totalin / 1023) * 5
                Next
            End If
    
    
            
    
    
            'Toggle the keepalive bit for nexttime.
            If KeepAliveBit = 0 Then
                KeepAliveBit = 1
            Else
                KeepAliveBit = 0
            End If
            'MsgBox("done")
        End Function
    i could set it at a higher interval but i didnt think it was needed because RR only updates the data once per second.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  3. #83
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Code:
    OutputArray(i) = Convert.ToByte(0 & KeepAliveBit & DigOut(i))
    That first part where it has a 0, means as soon as the Fusion Brain loses USB communication, wait 0^3 seconds so 0seconds, and turn off. So I would change that to 2 or something or make it update at least once a second.
    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. #84
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,170
    Blog Entries
    52
    Quote Originally Posted by mezz64 View Post
    Just had an idea, since you've adapted the communication code written by mx270a I'm going to enable outputs with his program then run RR and switch some screens and see what happens.

    This should tell me whether or not it's a hardware conflict or an RR interfacing issue.
    ok i've decreased the interval.. try this .dll (rename the file from rrfusion.txt to rrfusion.dll, then add it to your plugin folder). See how this one goes
    Attached Files Attached Files
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  5. #85
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Quote Originally Posted by 2k1Toaster View Post
    The first batch did have the timer off when no USB communication happens. So if it is going off when switching screens that means during that time, no USB communication, so it shuts off perhaps. When you made the plugin, what did you set the timer bits to?
    This makes some sense. It usually happens when a screen takes some time to load, afterwords it generally works ok. For instance the first time I load up iguidance it does it every time but when I switch back to after it's been loaded it rarely happens.

    As for the skinning of FCC I think my dislike lies with the fact that at the moment the coding scheme isn't documented that well. It just seemed to me that it takes too many steps to put together something simple with a few buttons to trip some outputs. It seems to be tailored well to designing complex analog input functions but when doing something simple the complexity becomes cumbersome.

    Just my 2 cents though, the functionality really is quite amazing, it's just not suited well to my application.

  6. #86
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Quote Originally Posted by Sonicxtacy02 View Post
    ok i've decreased the interval.. try this .dll (rename the file from rrfusion.txt to rrfusion.dll, then add it to your plugin folder). See how this one goes
    I'll give it a try, i'm keeping my fingers crossed!

  7. #87
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Just checked it out, still the same behavior with the plugin in RR. Running mx270a's program standalone works great though. I enabled my outputs then switched through about every screen I could in lsx void without any problems.

    Maybe I should see if the FB guys can send me the new firmware hex file so I can update my brain.

  8. #88
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,053
    Sonic, try changing that 0 to 1 or 2 or something like that, that should fix it unless there is something special about RR I am not aware of.
    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. #89
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,170
    Blog Entries
    52
    i'll change it in the morning i just wanted to try that interval fix before i left work.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  10. #90
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,170
    Blog Entries
    52
    ok mezz new version.. same process as the last. I've changed the 0 to 2 as toaster suggested.
    Attached Files Attached Files
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

Similar Threads

  1. *NEW* USB Input/Output Board -- Fusion Brain
    By 2k1Toaster in forum Fusion Brain
    Replies: 1123
    Last Post: 02-22-2010, 02:33 AM
  2. Replies: 15
    Last Post: 09-22-2008, 08:02 AM
  3. Noob has some biginner questions about the Fusion Brain
    By phreaknes in forum Fusion Brain
    Replies: 14
    Last Post: 04-29-2008, 02:57 AM
  4. pc reboot on sd startup
    By duanes7 in forum StreetDeck
    Replies: 3
    Last Post: 12-14-2007, 08:55 AM
  5. Replies: 5
    Last Post: 10-22-2007, 08:40 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
  •