PDA

View Full Version : Can anybody help with FSBUS? I'm so frustrated!!



stanhargs
02-06-2012, 06:28 PM
Hello everybody,
I have a Poldragonet overhead which uses FSBUS I/O and display boards to control the switches, light the LEDs and put the digits on the displays.
I use the really great iFly737 add-on, and to interface with FSUIPC I use an application called iFly737toFSUIPC which was created by one of the iFly737 team, Jouni.
The application allows you to link all the iFly737 variables to FSUIPC. The LEDs and displays are straightforward as they just link an OFFSET with a respective Bit and away you go!

I thought I'd worked out how to get my overhead switches working with FSBUS but have failed. So I'm asking for help, if anybody out there can think this one through.
What happens is that the FSBUS exe I have has an associated .ini file which is populated with definitions for all the switches, lights and displays for the B737NG - it actually uses all the offsets either for the default B737 or the Project Magenta variant. So, all the options for the iFly 737 are also there if you use the Proj Magenta entries and they are ready to be used.
What FSBUS lets you do is to set up a switch and then assign it to an ID in the .ini file, for example:



This switch in the example below defines the action for the Overhead No2 Engine Anti-Ice - whe the switch is pressed down it assigns a value of 1.

If we then look at the .ini file, I have defined offset 9400 under the internal ID992:

# Ini file for fsuipc values
# Last used: 970 26
# Lvl, Name ID Mode Offset Type Opt flags scan mul div
#------------------------------------------------------------------------------------------------------
2,"Overhead_Eng_Anti_Ice_2", 992, 0, 0x9400, I16, 0, RW, 1, 1, 1,


The fields from left to right are:
Lvl hierarchical depth of a parameter.
Name the name of the parameter as shown in Explorer
ID internal id of parameter.
Mode not used
Offset offset as defined in fsuipc
Type type of data (I8,I16,I32,I64,DOUBLE,BIT,STRING)
Opt if type = BIT, this is the bitnumber
flags various flags for this parameter
R read value from fs
W write value to fs
+ add the object value to the fs value
D delayed read back of a previous written value
scan how often is this parameter polled.
mul multiplier for the value
div divisor for the value

Assigning the basic offset does nothing as there is a parameter to be added - in the application it's called a command 'command', which in this case for No2 Eng Anti-Ice would be Commands 167 and 168 (ON, OFF).

As I've said, the lights and displays for the overhead are really easy, as they are just reading the offsets into FSBUS, but the switches have baffled me. I just don't know what the Command function is sending to the Offset 9400? Where can I add the parameter, for this switch 167 and 168?

If there's anyone who can help it would be fantastic, as I really don't want to rewire the whole overhead with OC boards if I can help it!!
cheers,
Neale

vonick
09-19-2012, 02:27 AM
Hi Neale

Firstly I use the CDK version of FSBUS.
Below is the ini file text for your switch.





F, FANTICE, 0, 0X9400, I16, 1, 1, 1, , RW
'Declare Offset......"F"=flightsim offset. "FANTICE"=name of offset. "0"=priority setting. "0x9400"=FSUIPC offset". "I16"=16 bit interger."1,1,1,,"=verious flags."RW"= read and write"

C, CANTICE, SWITCH, 1, 47, , 0, 0,
'Declare switch........ "C"= Cockpit item. "CANTICE"=Switch Name. "SWITCH"=Object. "1,47" switch location on board......",0,0," unused parameters

R, , CANTICE, FANTICE, 1, 1, 167
'Declare ROUTE........."R"=route "CANTICE"=switch. "FANTICE"=FSUIPC offset. "1"= Divisor. "1"=Multiplier. "167"=value to be added.


In the route, switch CANTICE returns a 1 or o (on or off) this is then added to 167 and passed to FANTICE (FSUIPC OFFSET)

Hope this helps

Mick