Results 331 to 340 of 737
Thread: Progamming help with FSBus dll
-
04-27-2010, 01:47 AM #331
Re: Progamming help with FSBus dll
Yeah that would make since just to make sure the wires are going to the right pin. And how do you know what kind of stepper motor to get?
Trevor
-
04-27-2010, 01:49 AM #332
Re: Progamming help with FSBus dll
Do you Stefan or David have skype?
-
04-27-2010, 01:52 AM #333
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
You get a PM.
-
04-27-2010, 04:08 AM #334
Re: Progamming help with FSBus dll
My wife does, but I can join, no problems.
I'll PM when I'm done.
David
-
04-27-2010, 06:44 AM #335
Re: Progamming help with FSBus dll
I think i found both of your User names for sype and i already added both of you
Trevor
-
04-27-2010, 07:05 AM #336
Re: Progamming help with FSBus dll
Hi Trevor,
Just sent you and Stefan a PM.
David
-
04-30-2010, 03:05 AM #337
Re: Progamming help with FSBus dll
My C++ i can only use with FS2004 right now. for what ever reason im not able to use it with FSX. Would you guys be willing to post your code of your main CPP so i can compare it with mine. And also can i have one C++ exe and use it for both FS2004 and FSX? I mostly use FS2004 but also would like to use my stuff with FSX for when i do Multiplayer Pilot/Copilot. Here is the code im using right now, what do i need to change so i can use it with both?
Code:#include "stdafx.h" #include "rvdb737ng.h" /* ------------ global variables ------------- */ extern BOOL bSynchronised = false; // cockpit not in sync with FS /* ========================== */ /* M A I N L I N E */ /* ========================== */ int _tmain(int argc, _TCHAR* argv[]) { int KeyboardInput = -1; // Input from keyboard short PauseState; // FS in Pause state (if 1) int V = GetFsbusDLLVersion(); printf("Detected Fsbus version %d.%d.%d\n", V/100, (V%100)/10, V%10); if (V < 200) { printf ("Program requires Fsbus DLL version 2.0.0 or higher\n"); return 1; } // signal(SIGINT, SIG_IGN); // Ignore Ctrl-Break // signal(SIGBREAK, SIG_IGN); // and Ctrl-C OpenLog(); // start log function CheckIn(); // Connect to FSbus.dll FsbusOpen("Com1"); // start communications with Fsbus GlareshieldBuildObjects(); // ) MainpanelBuildObjects(); // ) AftoverheadBuildObjects(); // ) FwdoverheadBuildObjects(); // ) Create objects by group PedestalBuildObjects(); // ) SoundBuildObjects(); // ) ThrottlequadrantBuildObjects(); // ) FsConnect(); // start communications with FS WriteLog(0,0,0); FsbusWriteFmt2(0,128,0); // Fsbus reset WriteLog(0,0,0); FsbusMux(3000); // time to process Fsbus events WriteLog(0,0,0); GlareshieldSync(); // ) MainpanelSync(); // ) AftoverheadSync(); // ) FwdoverheadSync(); // ) Sync cockpit with FS PedestalSync(); // ) ThrottlequadrantSync(); // ) bSynchronised = true; // we are in sync now printf("Hit Escape key to terminate Fsbus program....\n"); FsReadDirect(0x0264, 2, &PauseState); // get FS pause-state if (PauseState == 1) // paused { PauseState = 0; FsWriteDirect(0x0262, 2, &PauseState); // un-pause } /* - - - - wait for Escape (termination) by user - - - - */ while (KeyboardInput != VK_ESCAPE) // not 'Esc' key KeyboardInput = ReadKeyboard(1000); // check keyboard /* - - - - - - - - - - - - - - - - - - - - - - - - - - - */ CloseLog(); // stop logging CheckOut(); // disconnect FSbus.dll // signal(SIGBREAK, SIG_DFL); // Restore Ctrl-C default // signal(SIGINT, SIG_DFL); // and Ctrl-Break default return 0; // terminate program } // -------------------------------------------------------------- */ // Function called by fsbus.dll with every event. */ // Can also be called by other modules of this project */ // for example with synchronisation of cockpit with FS. */ // -------------------------------------------------------------- */ extern void EventHandler(int oid, int val, double dval) { WriteLog(oid, val, dval); // log event switch (oid / OBJECTS_PER_GROUP) // select group { case GROUP_MAINPANEL: MainpanelEventHandler(oid, val, dval); break; case GROUP_GLARESHIELD: GlareshieldEventHandler(oid, val, dval); break; case GROUP_AFTOVERHEAD: AftoverheadEventHandler(oid, val, dval); break; case GROUP_FWDOVERHEAD: FwdoverheadEventHandler(oid, val, dval); break; case GROUP_PEDESTAL: PedestalEventHandler(oid, val, dval); break; case GROUP_SOUND: SoundEventHandler(oid, val, dval); break; case GROUP_THROTTLEQUADRANT: ThrottlequadrantEventHandler(oid, val, dval); break; default: printf("%cError: Object %d (%d:%d) in unknown group.\n", 7, oid, oid / OBJECTS_PER_GROUP, oid % OBJECTS_PER_GROUP); } }
-
04-30-2010, 04:43 AM #338
Re: Progamming help with FSBus dll
Hey Trevor,
Good to have a chat the other night. I'm more than happy to post any of my code, but as requested, here is my main .cpp file.
Speak soon,
David
Code:// Davids Flight sim.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include
#include extern BOOL bSynchronised = false; int _tmain(int argc, _TCHAR* argv[]) { int v = GetFsbusDLLVersion (); if (v < 100) { printf ("Program requires Fsbus DLL version 1.0.0 or higher\r\n"); return 1; } CheckIn(); FsConnect(); FsbusOpen("COM1"); cbLLSwitchboardBuildObjects(); cbMagnetoBuildObjects(); //cbEngineBuildObjects(); cbEnginerpmBuildObjects(); cbGaugesBuildObjects(); cbSwitchesBuildObjects(); cbVoltmetersBuildObjects(); cbNavBuildObjects(); cbIndicatorlightsBuildObjects(); //cbMcpBuildObjects(); cbModecontrolpanelBuildObjects(); FsbusWriteFmt2(9,128,0); // Fsbus reset CID 9 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(10,128,0); // Fsbus reset CID 10 FsbusMux(350); FsbusWriteFmt2(11,128,0); // Fsbus reset CID 11 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(12,128,0); // Fsbus reset CID 12 FsbusMux(350); FsbusWriteFmt2(13,128,0); // Fsbus reset CID 13 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(14,128,0); // Fsbus reset CID 14 FsbusMux(350); FsbusWriteFmt2(15,128,0); // Fsbus reset CID 15 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(16,128,0); // Fsbus reset CID 16 FsbusMux(350); FsbusWriteFmt2(17,128,0); // Fsbus reset CID 17 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(18,128,0); // Fsbus reset CID 18 FsbusMux(350); FsbusWriteFmt2(19,128,0); // Fsbus reset CID 19 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(20,128,0); // Fsbus reset CID 20 FsbusMux(350); FsbusWriteFmt2(21,128,0); // Fsbus reset CID 21 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(22,128,0); // Fsbus reset CID 22 FsbusMux(350); FsbusWriteFmt2(23,128,0); // Fsbus reset CID 23 FsbusMux(350); // time to process Fsbus events FsbusWriteFmt2(24,128,0); // Fsbus reset CID 24 FsbusMux(350); bSynchronised = true; printf ("press any key to exit ...\r\n"); while (!_kbhit()) FsbusMux(500); CheckOut(); return 0; }
-
04-30-2010, 05:03 AM #339
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
FSbus only know FSUIPC.
There is no differance between FS9 or FSX.
-
04-30-2010, 05:16 AM #340
Re: Progamming help with FSBus dll
Hi Stefan,
This is what I thought too, so thanks for the confirmation.
David
Similar Threads
-
Fsbus CDK
By flyandre in forum General Builder Questions All Aircraft TypesReplies: 4Last Post: 12-27-2014, 12:58 PM -
Need Help Getting My FSBUS NG I/O Going Again..
By JBRoberts in forum I/O Interfacing Hardware and SoftwareReplies: 14Last Post: 03-21-2010, 01:38 PM -
Fsbus ng io
By Davral in forum I/O Interfacing Hardware and SoftwareReplies: 0Last Post: 01-10-2009, 10:38 PM -
Fsbus 2.4.3
By Anderson/SBSP in forum I/O Interfacing Hardware and SoftwareReplies: 9Last Post: 11-30-2008, 04:25 PM -
Help FSBUS
By cesarfsim in forum I/O Interfacing Hardware and SoftwareReplies: 2Last Post: 10-26-2008, 02:23 PM
Find Prettys Girls from your town for night
Is it just me? - Upper ECAM...