Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain > FB Skins


Reply
 
Share Thread Tools Display Modes
Old 10-27-2007, 08:38 AM   #1
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,283
h3rk will become famous soon enough
How do I Skin Analog Inputs?

From the big, long thread in post 455, I found:

Quote: Originally Posted by 2k1Toaster View Post
Code:
... Analogue Input Ports #STARTNEW# #NAME# #TYPE# #SETTINGS# #VIDPID# #IMAGESTATIC# #SIZE# #LOCATION# #SHOWTEXT# #PAGE# #PORT# #TXTCOLOUR# #BORDERSIZE# #FONT# #PLOTLENGTH# #MULTILEVELGRAPHICS# #HIGHTHRESHHOLD# #LOWTHRESHHOLD# #HIGHKEYSEQUENCE# #HIGHMAINWINDOWTITLE# #HIGHSUBWINDOWTITLE# #HIGHMAINCLASS# #HIGHSUBCLASS# #LOWKEYSEQUENCE# #LOWMAINWINDOWTITLE# #LOWSUBWINDOWTITLE# #LOWMAINCLASS# #LOWSUBCLASS# #ENDNEW# ...

And #458

Quote: Originally Posted by 2k1Toaster View Post
The 5 areas are:

>>MAIN
<<END

>>OUTPUTS
<<END

>>AI_INPUTS
<<END

>>DI_INPUTS
<<END

>>OTHERBUTTONS
<<END

To make a button you will need to put it within the needed brackets.
Its starts with #STARTNEW# and ends with #ENDNEW#

Then the factors inside are all the options for it. Some are required are some arent. Youll know which ones are required because it wont work or the program will crash.

In order for the i/o buttons to work they need to know what port they are on. The Ports are 0 index based. And multiple buttons can be assigned to the same port. So on all pages you could have a button for "launch missles" but only on 1 page would there be a confirm or something.

Now each i/o will also need a PID/VID. For all the ones that are currently out, use the string without quotes "vid_04d8&pid_000c" This is now what allows you to have multiple brains. Just assign different ports with dirrent pid's to different buttons.

All the outputs need to have #TYPE# of RELAY right now. That is the only working one.

if there is an animation, it must be #ANIMATION# and then the frames are between {} and the actual on/off states are 1 or 0 seperated by commas. Then 2 colons "::" and how many time to repeat. FOREVER or an integer value. Then the last one is the starting frame seperated by 2 colons again. 0 is what it should be left as.

And in the Brain/Skins/ Win 25$ thread, post #4

Quote: Originally Posted by 2k1Toaster View Post
This is the configuration for the Analogue Input Ports as well as an example below:

Code:
>>AI_INPUTS #STARTNEW# #NAME#RAW VOLTAGE #TYPE#VOLTAGE #SETTINGS#CELCIUS #VIDPID#vid_04d8&pid_000c #IMAGESTATIC#\Images\BMV2_Button.gif #SIZE#190,50 #LOCATION#80,350 #SHOWTEXT#true #PAGE#0 #PORT#0 #TXTCOLOUR#LightGray #BORDERSIZE#0 #FONT#Arial Narrow;18;BOLD #PLOTLENGTH#100 #ENDNEW# <<END

#NAME#Text to Appear
The Text To Appear is what appears on the button over the image. For example have textual buttons as well as or instead of all graphical buttons/icons.
#TYPE#ACCELEROMETER|PHOTOELECTRIC|PHOTOELECTRIC|PO TENTIOMETER|TEMPERATURE|VOLTAGE
The type of the sensor connected to the port. Used to determine how to parse the SETTINGS area.
#VIDPID#vidpid
If you use multiple firmware versions, then you need to change this. Default is vid_04d8&pid_000c
#IMAGESTATIC#path
#IMAGESTATIC# is the image to display for the input. Follows the same rules as the background image in the main section. The root folder is determined as the folder that the program was launched out of. So if you launch the program from C:\Fusion and have your images in C:\Fusion\images\button1.jpg then path would be \images\button1.jpg
#SIZE#width, height
#LOCATION#x,y
Both comma seperated. for LOCATION 0,0 refers to the top left corner.
#SHOWTEXT#true|false
If true then the text from NAME will be displayed on the button otherwise nothing will show.
#PAGE#x
Where x is the page where this button will be drawn. 0 is the first page. You can have unlimited amount of pages.
#PORT#
This is needed to determine which output this button connects to. Must be a value between 0 and 9 because there are only 10 analogue inputs on the board.
#TXTCOLOUR#Colour
The text will be the TXTCOLOURcolour. Needs a name such as Red, Blue, Green, Black, White and other standard colors. Default is LightGray and DarkGray to go with the BMV2 skin.
#BORDERSIZE#x
The border around the button. Set to 0 for graphical skins.
#FONT#name;pt size;extra style
The font for the text on the button
#PLOTLENGTH#
When you draw a graph, this is the number of data points will be stored on the graph. The rest of the points will be stored in a log file.
#MULTILEVELGRAPHICS#
#HIGHTHRESHHOLD#
#LOWTHRESHHOLD#
#HIGHKEYSEQUENCE#
#HIGHMAINWINDOWTITLE#
#HIGHSUBWINDOWTITLE#
#HIGHMAINCLASS#
#HIGHSUBCLASS#
#LOWKEYSEQUENCE#
#LOWMAINWINDOWTITLE#
#LOWSUBWINDOWTITLE#
#LOWMAINCLASS#
#LOWSUBCLASS#
#ENDNEW#

Which is the best writeup so far:

The black skin has this as the second input:

Code:
<<AI_INPUTS #STARTNEW# #NAME#Volume #TYPE#POTENTIOMETER #VIDPID#MyBrain0 #MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png #SIZE#92,144 #LOCATION#24,19 #SHOWTEXT#false #PAGE#0 #PORT#0 #BORDERSIZE#0 #PLOTLENGTH#100 #HIGHTHRESHHOLD#d0.05 #LOWTHRESHHOLD#d-0.05 #HIGHKEYSEQUENCE#DOWN #LOWKEYSEQUENCE#UP #HIGHMAINWINDOWTITLE#winamp #LOWMAINWINDOWTITLE#winamp #ENDNEW# ... <<END

I'm going to need to know more about this, and my apologies if this isn't extremely self explanitory for me:

with

Code:
#MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png

What does the 0,4.3 stand for?

Is it a minimum and maximum voltage?

How does it know what level to increment to the next level of the graphic?

Is the static image just like a background image for the 'meter'?

Code:
#HIGHTHRESHHOLD#d0.05 #LOWTHRESHHOLD#d-0.05

Is this what tells what each increment is?

And I have no idea what

Code:
#HIGHKEYSEQUENCE#DOWN #LOWKEYSEQUENCE#UP

is for...



Nick did an excellent job describing the first part of the properties for analog inputs (and the others) I just need a little help with the rest now, I'm experimenting on my own, but a little direction may save a lot of trial and error.


I'm using analog in as a home for what will be analog out to a driver for my fan in the AC circuit,for skin testing purposes. It would be nice if a lot of the same stuff from analog in carried over, so we can see what we're telling something to do without requiring seperate input feedback (that's usually reserved for critical processes in my experience).


EDIT: I was briefly able to get past the errors enough to see the meat of the analog input editor, that stuff helps a lot, sorry I wasn't able to see that before, the only successes I'm having are trial and error based, using a barebones skin in the editor to see how it's supposed to work, and then using notepad, FCC and debug to implement what I want. It's slow going, but at least I found a way to get some of the reference material I needed.

Last edited by h3rk; 10-27-2007 at 05:10 PM.
h3rk is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 10-28-2007, 12:34 AM   #2
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
Whew! That is a long post! Also the skin designer thread is sort of a beginning of documentation. And to make it more complicated, I added at least 4 more commands to the main section alone in the past like 4 hours.

Ok:

Quote: Originally Posted by h3rk View Post
I'm going to need to know more about this, and my apologies if this isn't extremely self explanitory for me:

with

Code:
#MULTILEVELGRAPHICS##0,4.3#\Black Skin\Analogue Graphs\Volume\Bar8.png;\Black Skin\Analogue Graphs\Volume\Bar7.png;\Black Skin\Analogue Graphs\Volume\Bar6.png;\Black Skin\Analogue Graphs\Volume\Bar5.png;\Black Skin\Analogue Graphs\Volume\Bar4.png;\Black Skin\Analogue Graphs\Volume\Bar3.png;\Black Skin\Analogue Graphs\Volume\Bar2.png;\Black Skin\Analogue Graphs\Volume\Bar1.png;\Black Skin\Analogue Graphs\Volume\Bar0.png

What does the 0,4.3 stand for?

Is it a minimum and maximum voltage?

Yes. And the units are in voltage.

Quote: Originally Posted by h3rk View Post
How does it know what level to increment to the next level of the graphic?

And it automatically determines what image to go to depending on the value and the number of images. If you have 2 images, and a 0-5v range, then between 0 and 2.5v, it will be image #1, and between 2.5 and 5 it will be image 2. If you have 10 images, and it is between 2.0 and 3.0, then between 0 and 2.1 it will be image 1, then between 2.1 and 2.2 it will be image 2, between 2.2 and 2.3 image 3, ect...


Quote: Originally Posted by h3rk View Post
Is the static image just like a background image for the 'meter'?

Static image means nothing if you use multiimage. It is exclusive or [XOR] not inclusive or. So it is "either single static image, multiple images, or rotating image".

Quote: Originally Posted by h3rk View Post
Code:
#HIGHTHRESHHOLD#d0.05 #LOWTHRESHHOLD#d-0.05

Is this what tells what each increment is?
And I have no idea what

Code:
#HIGHKEYSEQUENCE#DOWN #LOWKEYSEQUENCE#UP

is for...

This has nothing to do with the display. The thresholds are the values at which their events fire off at. And the "d" before is short for "delta" or "change of". So presently "d0.05" means "every time the input voltage changes by 0.5 volts, do...".

And the high threshold means "every time the input voltage increases by..." and the low threshold means "every time the input voltage decreases by...". They do not have to be the same but for most cases they will be.

And the "events" I just mentioned is part of the second part of code. As of right now the only events are "switch an output on or off", "switch multiple outputs on or off", or [XOR] "send a key to a program". So with the keysequence that is just the key to send. "UP" is the up arrow and "DOWN" is the down arrow.

Quote: Originally Posted by h3rk View Post
Nick did an excellent job describing the first part of the properties for analog inputs (and the others) I just need a little help with the rest now, I'm experimenting on my own, but a little direction may save a lot of trial and error.


I'm using analog in as a home for what will be analog out to a driver for my fan in the AC circuit,for skin testing purposes. It would be nice if a lot of the same stuff from analog in carried over, so we can see what we're telling something to do without requiring seperate input feedback (that's usually reserved for critical processes in my experience).


EDIT: I was briefly able to get past the errors enough to see the meat of the analog input editor, that stuff helps a lot, sorry I wasn't able to see that before, the only successes I'm having are trial and error based, using a barebones skin in the editor to see how it's supposed to work, and then using notepad, FCC and debug to implement what I want. It's slow going, but at least I found a way to get some of the reference material I needed.

Let me know how it works out for you.
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win $25 for designing the best skin for the Fusion Brain's Software! 2k1Toaster FB Skins 68 04-23-2009 01:38 PM
Velleman K8055 USB I/O Board Extension plugin 307SW_NLD RR Released Plugins 200 04-06-2009 07:02 AM
Virtual Earth cache builder? Or even gps simulator to make it cache? thepunkerguy DigitalMods (Scripts / API) 183 08-28-2008 09:58 PM
Working on a new skin, easy to read, easy to use monkeyracer RR Skins 29 01-12-2008 05:34 PM



All times are GMT -5. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics