View Full Version : FSBUS comm radio
LAKY911
02-04-2014, 02:56 PM
Hi everybody!
Can anybody help me with comm1 radio in CDK? I don't know how to set the first static "1" (1xx,xx MHz) on 7segment display. The FSUIPC offset 0x034E shows only 4 digits in BCD format. A frequency of 123.45 is represented by 2345. I am newbie in FSBUS so I don't know how to do it...
Thank You!
Regards
Lukas
John_B
02-21-2014, 10:39 AM
I used to use the CDK and all the digits worked without any special handling ?
Not sure what you might be doing here...are you using someone else's code and adjusting it to suit you ?
A friend has got me over to using the FSBUS DLL I found no-one out there able to help me with CDK( I too am a beginner) the DLL is actually way easier once you get your head around it (I still need masses of help from him though!).
I am not sure if I still have my cdk files (dab, ini & fsp etc) I will look later when I get home.
John
388TH_A
03-12-2014, 01:54 AM
im thinking about getting back into Building again.... Have you tried C++ with FSBUS? I tried the CDK but its old and C++ would be better for you to use I think. BUT dont get me wrong I will still use the CDK to test my Boards to to make sure they work. And then I use C++ with my boards with FS.
edit -
try C++ and then also use FSBUS ADMIN DLL 3.0 http://www.rvdijk.nl/download/fsbus/fsbus3_0.exe for testing your boards
John_B
03-12-2014, 04:02 AM
Agreed DLL and C++ is definitely the way to go !
John
sasazevedo
01-28-2016, 12:14 PM
Hello friends.
I have some cards Fsbus, and am trying to program in C++ COMM and NAV radios, but I'm having some difficulties ... Could anyone give a example so that I can follow?
John_B
01-29-2016, 04:44 AM
Hello friends.
I have some cards Fsbus, and am trying to program in C++ COMM and NAV radios, but I'm having some difficulties ... Could anyone give a example so that I can follow?
Hiya
Can you give a little more info?..what specific difficulties ? then I might be able to find bits of my script that will help (though I have not worked on it for months so will need some "practice":?)
John
sasazevedo
01-29-2016, 07:21 AM
Hello John!
First of all I apologize for bad English, I'm Brazilian ...
I've managed to do the reading of frequencies and send to the displays. My difficulty is in the programming of encoders, to change the frequencies and send to the FS. For now I'musing a plane default, but would like to use the Ifly 737, but still don't understand how to use the offsets of that plane. Could you give me a hand in this too?
I thank your attention and good will to help!
Sérgio.
John_B
01-30-2016, 07:30 AM
Hello John!
First of all I apologize for bad English, I'm Brazilian ...
I've managed to do the reading of frequencies and send to the displays. My difficulty is in the programming of encoders, to change the frequencies and send to the FS. For now I'musing a plane default, but would like to use the Ifly 737, but still don't understand how to use the offsets of that plane. Could you give me a hand in this too?
I thank your attention and good will to help!
Sérgio.
Hi Sergio
..Your English is just fine !!!!
I will try to help you as much as I can, but, I have been a bit out of touch as all work on my sim has been on hold for nearly a year and I forget fast.
Ok encoders need a bit of setting up as there are different encoder designs around (as you probably know) I shall assume you have set these up in fsadmin and they are all working fine? ie counting up and down one number at a time?.
I use the iFly 737 and to make life super easy for us Juno has written a program called iFlytoFsusipc..so you will need a copy of this (get it from the iFly forums) the document lists all the offsets is so cool...my nickname there is in2.
Let me search and try to find my code and I will get back to you. I say my code but a fellow FSBUS'er here (Ciccio) is my mentor!( although, currently, he is really busy with his real life !).
more soon
John
sasazevedo
01-30-2016, 08:27 PM
Hello John.
Have all system boards (COM, IO, DYSPLAYS and LEDS), and all boards work well, includingmanaged programming a MCP, which almost all working for the default aircraft, but would like to use at IFLY, but don't understand how to use the offsets it, as for example the offset 9402 ", that takes a bit to every thing ...
I'd like to understand how to do this in the program, for example:
MkFsObject(FS_AP_IAS, "",cbMcp,0x07E2,2,TP_UI16,FS_NORMAL,0);
How to use the offset 9402 IFLY's in the example above?
9402 0 DUCT_OVERHEAT_1_Light_Status
9402 1 DUCT_OVERHEAT_2_Light_Status
9402 2 DUAL_BLEED_Light_Status
9402 3 RAM_DOOR_FUEL_DOOR_1_Light_Status
9402 4 RAM_DOOR_FUEL_DOOR_2_Light_Status
9402 5 PACK_TRIP_OFF_1_Light_Status
9402 6 PACK_TRIP_OFF_2_Light_Status
9402 7 WING_BODY_OVERHEAT_1_Light_Status
I appreciate your attention and help.
Don't be in a hurry!
sasazevedo
01-30-2016, 08:32 PM
Hello John.
Have all system boards (with IO, DYSPLAYS and LEDS), and all boards work well, includingmanaged programming a MCP, which almost all working for the default aircraft, but would like to use at IFLY, but don't understand how to use the offsets it, as for example the offset9402 ", that takes a bit to every thing ...
I'd like to understand how to do this in the program, for example:!
MkFsObject(FS_AP_IAS, "",cbMcp,0x07E2,2,TP_UI16,FS_NORMAL,0);
How to use the offset 9402 IFLY's in the example above?
9402 0 DUCT_OVERHEAT_1_Light_Status
9402 1 DUCT_OVERHEAT_2_Light_Status
9402 2 DUAL_BLEED_Light_Status
9402 3 RAM_DOOR_FUEL_DOOR_1_Light_Status
9402 4 RAM_DOOR_FUEL_DOOR_2_Light_Status
9402 5 PACK_TRIP_OFF_1_Light_Status
9402 6 PACK_TRIP_OFF_2_Light_Status
9402 7 WING_BODY_OVERHEAT_1_Light_Status
I appreciate your attention and help.
Don't be in a hurry!
John_B
01-31-2016, 03:05 PM
Hello John.
Have all system boards (with IO, DYSPLAYS and LEDS), and all boards work well, includingmanaged programming a MCP, which almost all working for the default aircraft, but would like to use at IFLY, but don't understand how to use the offsets it, as for example the offset9402 ", that takes a bit to every thing ...
I'd like to understand how to do this in the program, for example:!
MkFsObject(FS_AP_IAS, "",cbMcp,0x07E2,2,TP_UI16,FS_NORMAL,0);
How to use the offset 9402 IFLY's in the example above?
9402 0 DUCT_OVERHEAT_1_Light_Status
9402 1 DUCT_OVERHEAT_2_Light_Status
9402 2 DUAL_BLEED_Light_Status
9402 3 RAM_DOOR_FUEL_DOOR_1_Light_Status
9402 4 RAM_DOOR_FUEL_DOOR_2_Light_Status
9402 5 PACK_TRIP_OFF_1_Light_Status
9402 6 PACK_TRIP_OFF_2_Light_Status
9402 7 WING_BODY_OVERHEAT_1_Light_Status
I appreciate your attention and help.
Don't be in a hurry!
Ah ok
Now my memory is bad so I am not sure the best way to explain without getting really into the swing of things again but if memory serves this is "bitwise operations"
The state of the 8 bits held in the offset determine which lights are on/off...my description might be bad but this code works. clips from my CPP file
So taking you example of 9402 .
The remarked out (//) ones are entries ready for the correct CID/RID's where I have change my boards around
at the top where you declare stuff
// fwdoverhead.by John with masses of help from Ciccio
#define ZERO 0x01
#define ONE 0x02
#define TWO 0x04
#define THREE 0x08
#define FOUR 0x10
#define FIVE 0x20
#define SIX 0x40
#define SEVEN 0x80
#include "stdafx.h"
//Annunciators
//Offset9402
//MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_1, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
// MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
// MkFsbusObject (BTP_D_OUT, ANNUN_DUCT_OVEHEAT_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
MkFsbusObject (BTP_D_OUT, ANNUN_RAM_DOOR_FUEL_DOOR_1, "", EventHandlerFwdOverhead,8,32,0);
MkFsbusObject (BTP_D_OUT, ANNUN_RAM_DOOR_FUEL_DOOR_2, "", EventHandlerFwdOverhead,8,33,0);
MkFsbusObject (BTP_D_OUT, ANNUN_PACK_TRIP_OFF_1, "", EventHandlerFwdOverhead,8,55,0);
// MkFsbusObject (BTP_D_OUT, ANNUN_PACK_TRIP_OFF_2, "", EventHandlerFwdOverhead,X,XX,0); //CHANGE CID X AND XX CONNECTOR TO SUIT PANEL
MkFsbusObject (BTP_D_OUT, ANNUN_WING_BODY_OHEAT_1, "", EventHandlerFwdOverhead,8,52,0);
then further down the script the case statement to handle it
case FS_9402_ANNUNS:
// printf(" OFFSET 9402 READS ( %d )", Value);
// if (Value & ZERO ){ FsbusWrite(ANNUN_DUCT_OVEHEAT_1, 1);} //next board
// else if (Value | ZERO){FsbusWrite(ANNUN_DUCT_OVEHEAT_1, 0);} //next board
// if (Value & ONE ){ FsbusWrite(ANNUN_DUCT_OVEHEAT_2, 1);} //next board
// else if (Value | ONE){ FsbusWrite(ANNUN_DUCT_OVEHEAT_2, 0);} //next board
// if (Value & TWO ){ FsbusWrite(ANNUN_DUAL_BLEED,, 1);} //next board
// else if (Value | TWO){ FsbusWrite(ANNUN_DUAL_BLEED,, 0);} //next board
if (Value & THREE){FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_1, 1);} //CID 8
else if (Value | THREE){ FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_1, 0);} //CID 8
if (Value & FOUR ){ FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_2, 1);} //CID 8
else if (Value | FOUR){FsbusWrite(ANNUN_RAM_DOOR_FUEL_DOOR_2, 0);} //CID 8
if (Value & FIVE ){ FsbusWrite(ANNUN_PACK_TRIP_OFF_1, 1);}
else if (Value | FIVE){ FsbusWrite(ANNUN_PACK_TRIP_OFF_1, 0);}
// if (Value & SIX ){ FsbusWrite(ANNUN_PACK_TRIP_OFF_2, 1);} //NEXT PCB
// else if (Value | SIX){ FsbusWrite(ANNUN_PACK_TRIP_OFF_2, 0);} // NEXT PCB
if (Value & SEVEN ){FsbusWrite(ANNUN_WING_BODY_OHEAT_1, 1);} //CID 8
else if (Value | SEVEN){ FsbusWrite(ANNUN_WING_BODY_OHEAT_1, 0);} //CID 8
As I say I am a year out of practice (long story) so I may not be describing this very well hope to be in the swing of things over the next few months or so. (sorry If I am worsening things...)
Private me or contact me via the Ifly forum if you want any of my scripts.
John
John_B
01-31-2016, 03:53 PM
Further to your post..
The IAS (indicated air speed ) is the 'SPD' offset in ifly2fsuipc (offset 9436) the value held in that offset is the absolute value needed to show on the display and therefore there's no real relation to how we handle that like the bitwise stuff.
PM me !
John
sasazevedo
01-31-2016, 11:32 PM
John, you are being very helpful!
His explanation cleared my mind to understand a more enfeebled bitwise treatment of theseoffsets, but ideally be able to see a full part of your program, so you can better understandthe entire string, and put into practice here.
Unfortunately I do not have registration in Ifly Forum, but my email is sasazevedo@hotmail.com (issasazevedo@hotmail.com).
Strong hug.
Sergio.
John_B
02-01-2016, 12:07 PM
Hi Sergio
I will zip them up and send them to you.
The only problem you might find is where I comment and remark things out ...This might not make much sense to you (my remarks don't even make sense to me now I revisit).
Also a lot of stuff that works just fine will be remarked out I do this when testing/writing new sections.
John
sasazevedo
02-01-2016, 01:53 PM
Hello again John.
Once again I say that your help is being very helpful, and I appreciate your goodwill.
The program that I made using the offsets default, was possible due to the examplesposted by Forum staff, and the good that, in addition to the fun, is the enrichment of learning being very good, because as I said, I'm not a professional programmer, I'm just anaviation lover with some knowledge in programming logic, which is trying to buildgradually his home cockpit.
Hug.
Sergio.
John_B
02-01-2016, 06:17 PM
HI Sergio
Your email is bouncing??? Private message me.
John
sasazevedo
02-01-2016, 07:34 PM
John, eu não sei como enviar privado ...
Give me your email I will answer!
388TH_A
02-04-2016, 02:39 PM
John, eu não sei como enviar privado ...
Give meyouremail I will answer!
PM your email and I can give you a zip file of a c++ fsbus project that helped me learn, might answer alot of your questions